New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors, buffer: Migrate buffer errors to use internal/errors #13976

Merged
merged 1 commit into from Jul 12, 2017

Conversation

@starkwang
Contributor

starkwang commented Jun 29, 2017

Migrate buffer errors to use internal/errors.

Ref: #11273

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

buffer, errors

Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated doc/api/errors.md Outdated
Show outdated Hide outdated test/parallel/test-buffer-from.js Outdated
Show outdated Hide outdated test/common/index.js Outdated
Show outdated Hide outdated lib/internal/errors.js Outdated
Show outdated Hide outdated doc/api/errors.md Outdated
Show outdated Hide outdated lib/buffer.js Outdated
@starkwang

This comment has been minimized.

Show comment
Hide comment
@starkwang

starkwang Jul 5, 2017

Contributor

Now all the errors in buffer module have been migrated into internal/errors.

Contributor

starkwang commented Jul 5, 2017

Now all the errors in buffer module have been migrated into internal/errors.

Show outdated Hide outdated lib/buffer.js Outdated
if (typeof value === 'number')
throw new TypeError('"value" argument must not be a number');
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'value', 'not number',

This comment has been minimized.

@mhdawson

mhdawson Jul 6, 2017

Member

What does the string end up being here ? I think this may be the first case were we have the 'not' cases versus listing out what it should be.

@mhdawson

mhdawson Jul 6, 2017

Member

What does the string end up being here ? I think this may be the first case were we have the 'not' cases versus listing out what it should be.

This comment has been minimized.

@starkwang

starkwang Jul 7, 2017

Contributor

I extended the invalidArgType(name, expected, actual) in internal/errors.js to make it adapt to the 'not' cases. See here.

The case here will end up being:

TypeError [ERR_INVALID_ARG_TYPE]: The "value" argument must not be of type number. Received type number

The tests for it is also changed.

@starkwang

starkwang Jul 7, 2017

Contributor

I extended the invalidArgType(name, expected, actual) in internal/errors.js to make it adapt to the 'not' cases. See here.

The case here will end up being:

TypeError [ERR_INVALID_ARG_TYPE]: The "value" argument must not be of type number. Received type number

The tests for it is also changed.

Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated lib/buffer.js Outdated
@mhdawson

This comment has been minimized.

Show comment
Hide comment
@mhdawson

mhdawson Jul 6, 2017

Member

This turns out to be one of the more challenging ones to convert, thanks for the work so far. A few more comments.

Member

mhdawson commented Jul 6, 2017

This turns out to be one of the more challenging ones to convert, thanks for the work so far. A few more comments.

Show outdated Hide outdated doc/api/errors.md Outdated
Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated lib/buffer.js Outdated
Show outdated Hide outdated test/common/index.js Outdated

@refack refack dismissed their stale review Jul 6, 2017

CR addressed

@refack

This comment has been minimized.

Show comment
Hide comment
@refack

refack Jul 6, 2017

Member

@starkwang this is really good work. I would approve after you address the comments.

Optionally if you have some more patience to replace all the RegExps with common.expectsError that would be fantastic. But it could also wait for a future PR.

Member

refack commented Jul 6, 2017

@starkwang this is really good work. I would approve after you address the comments.

Optionally if you have some more patience to replace all the RegExps with common.expectsError that would be fantastic. But it could also wait for a future PR.

@starkwang

This comment has been minimized.

Show comment
Hide comment
@starkwang

starkwang Jul 7, 2017

Contributor

Pushed commit to address comments.

Contributor

starkwang commented Jul 7, 2017

Pushed commit to address comments.

@@ -1466,7 +1467,7 @@ Buffer.prototype.swap32 = function swap32() {
// dropping down to the native code is faster.
const len = this.length;
if (len % 4 !== 0)
throw new RangeError('Buffer size must be a multiple of 32-bits');
throw new errors.RangeError('ERR_INVALID_BUFFER_SIZE', '32-bits');

This comment has been minimized.

@starkwang

starkwang Jul 7, 2017

Contributor

ERR_INVALID_BUFFER_SIZE is added into error code for the error here

@starkwang

starkwang Jul 7, 2017

Contributor

ERR_INVALID_BUFFER_SIZE is added into error code for the error here

This comment has been minimized.

@refack

refack Jul 7, 2017

Member

Since this code is for a little bit more specific condition, think about ERR_INVALID_BUFFER_ALIGNMENT, but this is just a suggestion. ERR_INVALID_BUFFER_SIZE might be useful for more situations in the future, so it's Ok too.
@starkwang it's your PR, so you should decide 👍

@refack

refack Jul 7, 2017

Member

Since this code is for a little bit more specific condition, think about ERR_INVALID_BUFFER_ALIGNMENT, but this is just a suggestion. ERR_INVALID_BUFFER_SIZE might be useful for more situations in the future, so it's Ok too.
@starkwang it's your PR, so you should decide 👍

Show outdated Hide outdated lib/buffer.js Outdated
@refack

refack approved these changes Jul 7, 2017 edited

Excellent work!
(left just some wording nits)

Show outdated Hide outdated doc/api/errors.md Outdated
Show outdated Hide outdated doc/api/errors.md Outdated
Show outdated Hide outdated lib/buffer.js Outdated
@@ -1466,7 +1467,7 @@ Buffer.prototype.swap32 = function swap32() {
// dropping down to the native code is faster.
const len = this.length;
if (len % 4 !== 0)
throw new RangeError('Buffer size must be a multiple of 32-bits');
throw new errors.RangeError('ERR_INVALID_BUFFER_SIZE', '32-bits');

This comment has been minimized.

@refack

refack Jul 7, 2017

Member

Since this code is for a little bit more specific condition, think about ERR_INVALID_BUFFER_ALIGNMENT, but this is just a suggestion. ERR_INVALID_BUFFER_SIZE might be useful for more situations in the future, so it's Ok too.
@starkwang it's your PR, so you should decide 👍

@refack

refack Jul 7, 2017

Member

Since this code is for a little bit more specific condition, think about ERR_INVALID_BUFFER_ALIGNMENT, but this is just a suggestion. ERR_INVALID_BUFFER_SIZE might be useful for more situations in the future, so it's Ok too.
@starkwang it's your PR, so you should decide 👍

Show outdated Hide outdated lib/internal/errors.js Outdated
Show outdated Hide outdated test/common/index.js Outdated

@refack refack self-assigned this Jul 7, 2017

@refack

This comment has been minimized.

Show comment
Hide comment
@refack

refack Jul 7, 2017

Member

/cc @nodejs/documentation @cjihrig PTAL at some new Error codes and documentation

Member

refack commented Jul 7, 2017

/cc @nodejs/documentation @cjihrig PTAL at some new Error codes and documentation

@refack

This comment has been minimized.

Show comment
Hide comment
@refack

refack Jul 7, 2017

Member

CI the asses status of code in PR: https://ci.nodejs.org/job/node-test-pull-request/9026/
(I'll wait 48 hours more for doc comments) waiting for two CTC reviews

Member

refack commented Jul 7, 2017

CI the asses status of code in PR: https://ci.nodejs.org/job/node-test-pull-request/9026/
(I'll wait 48 hours more for doc comments) waiting for two CTC reviews

@refack

This comment has been minimized.

Show comment
Hide comment
@refack

refack Jul 7, 2017

Member

/cc @nodejs/ctc this is semver-major

Member

refack commented Jul 7, 2017

/cc @nodejs/ctc this is semver-major

@starkwang

This comment has been minimized.

Show comment
Hide comment
@starkwang

starkwang Jul 7, 2017

Contributor

It seems like the CI failed after merged to the master.
I've fixed it. Shall we restart the CI?

Contributor

starkwang commented Jul 7, 2017

It seems like the CI failed after merged to the master.
I've fixed it. Shall we restart the CI?

@refack

This comment has been minimized.

Show comment
Hide comment
Member

refack commented Jul 7, 2017

Show outdated Hide outdated test/common/index.js Outdated
@refack

This comment has been minimized.

Show comment
Hide comment

@starkwang starkwang referenced this pull request Jul 8, 2017

Closed

buffer: remove MAX_SAFE_INTEGER check on length #14131

2 of 2 tasks complete
@mcollina

LGTM

@jasnell

This comment has been minimized.

Show comment
Hide comment
@refack

This comment has been minimized.

Show comment
Hide comment
@refack

refack Jul 12, 2017

Member

Killed https://ci.nodejs.org/job/node-test-commit-arm/10847/nodes=armv7-wheezy/ after it had a few test fails, and there are others as well (12 in total):

not ok 86 parallel/test-buffer-bytelength
  ---
  duration_ms: 0.411
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 4.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-bytelength.js:9:23)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 87 parallel/test-buffer-compare
  ---
  duration_ms: 0.409
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-compare.js:31:23)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 97 parallel/test-buffer-includes
  ---
  duration_ms: 0.407
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 3.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-includes.js:274:30)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 99 parallel/test-buffer-indexof
  ---
  duration_ms: 0.708
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 3.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-indexof.js:347:33)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 103 parallel/test-buffer-negative-length
  ---
  duration_ms: 0.407
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 5.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-negative-length.js:7:34)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 105 parallel/test-buffer-no-negative-allocation
  ---
  duration_ms: 0.407
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 12.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-no-negative-allocation.js:6:20)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 107 parallel/test-buffer-over-max-length
  ---
  duration_ms: 0.409
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 12.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-over-max-length.js:10:33)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 112 parallel/test-buffer-regression-649
  ---
  duration_ms: 0.408
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 5.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-regression-649.js:9:24)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 117 parallel/test-buffer-slow
  ---
  duration_ms: 0.416
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-slow.js:51:33)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 123 parallel/test-buffer-write
  ---
  duration_ms: 0.410
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-write.js:6:30)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 1417 parallel/test-writeint
  ---
  duration_ms: 0.407
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 12.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeint.js:28:33)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 1418 parallel/test-writeuint
  ---
  duration_ms: 0.415
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
  ... 
Member

refack commented Jul 12, 2017

Killed https://ci.nodejs.org/job/node-test-commit-arm/10847/nodes=armv7-wheezy/ after it had a few test fails, and there are others as well (12 in total):

not ok 86 parallel/test-buffer-bytelength
  ---
  duration_ms: 0.411
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 4.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-bytelength.js:9:23)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 87 parallel/test-buffer-compare
  ---
  duration_ms: 0.409
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-compare.js:31:23)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 97 parallel/test-buffer-includes
  ---
  duration_ms: 0.407
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 3.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-includes.js:274:30)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 99 parallel/test-buffer-indexof
  ---
  duration_ms: 0.708
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 3.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-indexof.js:347:33)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 103 parallel/test-buffer-negative-length
  ---
  duration_ms: 0.407
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 5.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-negative-length.js:7:34)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 105 parallel/test-buffer-no-negative-allocation
  ---
  duration_ms: 0.407
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 12.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-no-negative-allocation.js:6:20)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 107 parallel/test-buffer-over-max-length
  ---
  duration_ms: 0.409
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 12.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-over-max-length.js:10:33)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 112 parallel/test-buffer-regression-649
  ---
  duration_ms: 0.408
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 5.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-regression-649.js:9:24)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 117 parallel/test-buffer-slow
  ---
  duration_ms: 0.416
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-slow.js:51:33)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 123 parallel/test-buffer-write
  ---
  duration_ms: 0.410
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-buffer-write.js:6:30)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 1417 parallel/test-writeint
  ---
  duration_ms: 0.407
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 12.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeint.js:28:33)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
  ...
not ok 1418 parallel/test-writeuint
  ---
  duration_ms: 0.415
  severity: fail
  stack: |-
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
    Mismatched <anonymous> function calls. Expected exactly 1, actual 2.
        at Object.exports.mustCall (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:481:10)
        at Object.expectsError (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:707:27)
        at testUint (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:152:27)
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-writeuint.js:171:1)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
  ... 
@refack

This comment has been minimized.

Show comment
Hide comment
@refack

refack Jul 12, 2017

Member

Just help thing along I rebased and added the missing call count in the tests
Quick test: https://ci.nodejs.org/job/node-test-commit-linuxone/7240/

Member

refack commented Jul 12, 2017

Just help thing along I rebased and added the missing call count in the tests
Quick test: https://ci.nodejs.org/job/node-test-commit-linuxone/7240/

@refack

This comment has been minimized.

Show comment
Hide comment
@refack

refack Jul 12, 2017

Member

Full CI: https://ci.nodejs.org/job/node-test-pull-request/9095/ CI is ✔️ (except for known unrelated issues)

Member

refack commented Jul 12, 2017

Full CI: https://ci.nodejs.org/job/node-test-pull-request/9095/ CI is ✔️ (except for known unrelated issues)

refack added a commit to refack/node that referenced this pull request Jul 12, 2017

errors,buffer: port errors to internal/errors
PR-URL: nodejs#13976
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
errors,buffer: port errors to internal/errors
PR-URL: #13976
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>

@refack refack merged commit dbfe8c4 into nodejs:master Jul 12, 2017

@starkwang

This comment has been minimized.

Show comment
Hide comment
@starkwang

starkwang Jul 13, 2017

Contributor

@refack Thank you for your continued support! :D

Contributor

starkwang commented Jul 13, 2017

@refack Thank you for your continued support! :D

@refack

This comment has been minimized.

Show comment
Hide comment
@refack

refack Jul 13, 2017

Member

@refack Thank you for your continued support! :D

This project progresses by the efforts of contributors such as yourself (Collaborators are here mostly to support that)!
Keep up the great work 🥇

Member

refack commented Jul 13, 2017

@refack Thank you for your continued support! :D

This project progresses by the efforts of contributors such as yourself (Collaborators are here mostly to support that)!
Keep up the great work 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment