GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — os: destructure ERR_SYSTEM_ERROR properly by cjihrig · Pull Request #22394 · nodejs/node

Conversation

@cjihrig

@cjihrig cjihrig commented Aug 19, 2018

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Aug 19, 2018

Copy link
Copy Markdown
Collaborator

@cjihrig build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/590/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added the os Issues and PRs related to the os subsystem. label Aug 19, 2018
lpinca
lpinca approved these changes Aug 19, 2018
View reviewed changes
targos
targos approved these changes Aug 19, 2018
View reviewed changes

@targos targos left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would there be any way to add a test for it?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
trivikr
trivikr approved these changes Aug 19, 2018
View reviewed changes
jasnell
jasnell approved these changes Aug 19, 2018
View reviewed changes
BridgeAR
BridgeAR approved these changes Aug 19, 2018
View reviewed changes
tniessen
tniessen approved these changes Aug 19, 2018
View reviewed changes
@cjihrig cjihrig mentioned this pull request Aug 20, 2018
os: add os.{get,set}Priority() #22407
Merged
4 tasks done
@cjihrig

cjihrig commented Aug 20, 2018

Copy link
Copy Markdown
Contributor Author

Would there be any way to add a test for it?

'use strict';
// Monkey patch the os binding before requiring any other modules.
process.binding('os').getHomeDirectory = function(ctx) {
  ctx.syscall = 'foo';
  ctx.code = 'bar';
  ctx.message = 'baz';
};

const common = require('../common');
const os = require('os');

common.expectsError(os.homedir, {
  message: /^A system error occurred: foo returned bar \(baz\)$/
});
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR BridgeAR added the fast-track PRs proposed for a shorter-than-standard waiting period before landing. label Aug 20, 2018
@BridgeAR

BridgeAR commented Aug 20, 2018

Copy link
Copy Markdown
Member

@targos I guess it's your call if you want to have the test or not.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Aug 20, 2018

Copy link
Copy Markdown
Member

I think it's good practice to land a regression test with the fix but I won't block this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cjihrig
cjihrig force-pushed the os branch from d0c6f0b to 5eb3407 Compare August 20, 2018 13:13
@cjihrig

cjihrig commented Aug 20, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

I've added a test coverage commit.

CI: https://ci.nodejs.org/job/node-test-pull-request/16608/

EDIT: CI was all green.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos
targos approved these changes Aug 20, 2018
View reviewed changes

@targos targos left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cjihrig
cjihrig force-pushed the os branch from 5eb3407 to 2f3fb84 Compare August 20, 2018 15:33
cjihrig added 2 commits August 20, 2018 11:33
@cjihrig
os: destructure ERR_SYSTEM_ERROR properly
5e420f9
PR-URL: nodejs#22394
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@cjihrig
test: cover error case in os getCheckedFunction()
8d05a15
getCheckedFunction() is used internally by the os module to
handle errors from the binding layer in several methods. This
commit adds a test for the case where the binding layer returns
an error.

PR-URL: nodejs#22394
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@cjihrig
cjihrig force-pushed the os branch from 2f3fb84 to 8d05a15 Compare August 20, 2018 15:33
@cjihrig
cjihrig merged commit 8d05a15 into nodejs:master Aug 20, 2018
@cjihrig
cjihrig deleted the os branch August 20, 2018 15:35
targos pushed a commit that referenced this pull request Aug 21, 2018
@cjihrig @targos
os: destructure ERR_SYSTEM_ERROR properly
0ea5d16
PR-URL: #22394
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
targos pushed a commit that referenced this pull request Aug 21, 2018
@cjihrig @targos
test: cover error case in os getCheckedFunction()
69b0ba9
getCheckedFunction() is used internally by the os module to
handle errors from the binding layer in several methods. This
commit adds a test for the case where the binding layer returns
an error.

PR-URL: #22394
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
targos pushed a commit that referenced this pull request Sep 3, 2018
@cjihrig @targos
os: destructure ERR_SYSTEM_ERROR properly
30b22a6
PR-URL: #22394
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
targos pushed a commit that referenced this pull request Sep 3, 2018
@cjihrig @targos
test: cover error case in os getCheckedFunction()
fbc189b
getCheckedFunction() is used internally by the os module to
handle errors from the binding layer in several methods. This
commit adds a test for the case where the binding layer returns
an error.

PR-URL: #22394
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
targos added a commit that referenced this pull request Sep 5, 2018
@targos
2018-09-06, Version 10.10.0 (Current)
8a45a6c
Notable changes:

* child_process:
  * `TypedArray` and `DataView` values are now accepted as input by
    `execFileSync` and `spawnSync`. #22409
* coverage:
  * Native V8 code coverage information can now be output to disk by setting the
    environment variable `NODE_V8_COVERAGE` to a directory. #22527
* deps:
  * The bundled npm was upgraded to version 6.4.1. #22591
    * Changelogs:
      [6.3.0-next.0](https://github.com/npm/cli/releases/tag/v6.3.0-next.0)
      [6.3.0](https://github.com/npm/cli/releases/tag/v6.3.0)
      [6.4.0](https://github.com/npm/cli/releases/tag/v6.4.0)
      [6.4.1](https://github.com/npm/cli/releases/tag/v6.4.1)
* fs:
  * The methods `fs.read`, `fs.readSync`, `fs.write`, `fs.writeSync`,
    `fs.writeFile` and `fs.writeFileSync` now all accept `TypedArray` and
    `DataView` objects. #22150
  * A new boolean option, `withFileTypes`, can be passed to to `fs.readdir` and
    `fs.readdirSync`. If set to true, the methods return an array of directory
    entries. These are objects that can be used to determine the type of each
    entry and filter them based on that without calling `fs.stat`. #22020
* http2:
  * The `http2` module is no longer experimental. #22466
* os:
  * Added two new methods: `os.getPriority` and `os.setPriority`, allowing to
    manipulate the scheduling priority of processes. #22394
* process:
  * Added `process.allowedNodeEnvironmentFlags`. This object can be used to
    programmatically validate and list flags that are allowed in the
    `NODE_OPTIONS` environment variable. #19335
* src:
  * Deprecated option variables in public C++ API. #22392
  * Refactored options parsing. #22392
* vm:
  * Added `vm.compileFunction`, a method to create new JavaScript functions from
    a source body, with options similar to those of the other `vm` methods. #21571
* Added new collaborators:
  * [lundibundi](https://github.com/lundibundi) - Denys Otrishko

PR-URL: #22716
@targos targos mentioned this pull request Sep 5, 2018
Release proposal: v10.10.0 #22716
Merged
This was referenced Sep 6, 2018
2018-09-06 Version 10.10.0 (Current) @targos beevelop/docker-android-nodejs#236
Closed
2018-09-06 Version 10.10.0 (Current) @targos beevelop/docker-nodejs#221
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@lpinca lpinca lpinca approved these changes
@tniessen tniessen tniessen approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes
@trivikr trivikr trivikr approved these changes
+1 more reviewer
@targos targos targos approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

fast-track PRs proposed for a shorter-than-standard waiting period before landing. os Issues and PRs related to the os subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@cjihrig @nodejs-github-bot @BridgeAR @targos @jasnell @lpinca @tniessen @trivikr
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.