Skip to content
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

nodejs Makefile:196: recipe for target 'test' failed make: *** [test] Error 1 #14654

Closed
topquant opened this issue Aug 6, 2017 · 14 comments
Closed
Labels
os Issues and PRs related to the os subsystem. test Issues and PRs related to the tests.

Comments

@topquant
Copy link

topquant commented Aug 6, 2017

Version: node-v8.2.1
Platform: Linux 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Subsystem: if known, please specify affected core module name

  • Version: node-v8.2.1
  • Platform: Ubuntu 16.04 LTS -Linux 4.4.0-89-generic x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem:

tail of "make test"

[----------] Global test environment tear-down
[==========] 47 tests from 6 test cases ran. (1410 ms total)
[  PASSED  ] 47 tests.
/usr/bin/python tools/test.py --mode=release -J \
	async-hooks doctool inspector known_issues message parallel pseudo-tty sequential \
	addons addons-napi
=== release test-os ===                                                        
Path: parallel/test-os
assert.js:60
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: [ { address: '127.0.0.1',
    netmask: '255.0.0.0',
    family: 'IPv4',
    mac: '00:00:00:00:00:00',
    internal: true },
  {  deepStrictEqual [ { address: '127.0.0.1',
    netmask: '255.0.0.0',
    mac: '00:00:00:00:00:00',
    family: 'IPv4',
    internal: true } ]
    at Object.<anonymous> (/home/developer2/node-v8.2.1/test/parallel/test-os.js:124:14)
    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)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/developer2/node-v8.2.1/test/parallel/test-os.js
[07:49|% 100|+ 1635|-   1]: Done                                               
Makefile:196: recipe for target 'test' failed
make: *** [test] Error 1

(edited by @vsemozhetbyt: added backticks for the output block, delete template's comments residue)

@vsemozhetbyt vsemozhetbyt added os Issues and PRs related to the os subsystem. test Issues and PRs related to the tests. labels Aug 6, 2017
@Trott
Copy link
Member

Trott commented Aug 6, 2017

@topquant What's the output of this command?

./node -e "console.log(os.networkInterfaces().lo.filter((e) => e.address === '127.0.0.1'))"

@topquant
Copy link
Author

topquant commented Aug 6, 2017 via email

@Trott
Copy link
Member

Trott commented Aug 7, 2017

@vsemozhetbyt Looks like all that's happening is assert.deepStrictEqual() is truncating its output, which is intentional although unhelpful in this situation.

@topquant It seems like you somehow have two IPv4 loopback interfaces configured with different netmasks. Ideally this shouldn't cause a problem for the test, but of course it does. However it also seems (to me, at least) very unusual. Is it possible there's some kind of odd configuration going on with your machine? Or is it a pretty standard out-of-the-box configuration?

@Trott
Copy link
Member

Trott commented Aug 7, 2017

@topquant If you change lines 120-124 of test/parallel/test-os.js from this:

    const actual = interfaces.lo.filter(filter);
    const expected = [{ address: '127.0.0.1', netmask: '255.0.0.0',
                        mac: '00:00:00:00:00:00', family: 'IPv4',
                        internal: true }];
    assert.deepStrictEqual(actual, expected);

…to this:

    const filteredLocalhost = interfaces.lo.filter(filter);
    const expected = { address: '127.0.0.1', netmask: '255.0.0.0',
                       mac: '00:00:00:00:00:00', family: 'IPv4',
                       internal: true };
    assert.ok(filteredLocalhost.includes(expected));

…does the test pass then?

@topquant
Copy link
Author

topquant commented Aug 7, 2017 via email

@topquant
Copy link
Author

topquant commented Aug 7, 2017 via email

@Trott
Copy link
Member

Trott commented Aug 7, 2017

Oh, of course, .includes() won't work because it's a different object.... let me try again...

Does this fix it for you?

  case 'linux':
  {
    const fltr = (e) => e.address === '127.0.0.1' && e.netmask === '255.0.0.0';
    const actual = interfaces.lo.filter(fltr);
    const expected = [{ address: '127.0.0.1', netmask: '255.0.0.0',
                        mac: '00:00:00:00:00:00', family: 'IPv4',
                        internal: true }];
    assert.deepStrictEqual(actual, expected);
    break;
  }

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Aug 7, 2017

@Trott Maybe it is worth to add ellipses here if strings are truncated? It would be breaking change though.

Trott added a commit to Trott/io.js that referenced this issue Aug 7, 2017
The check for `os.networkInterfaces()` in `test-os.js` may be too
strict. It's apparently possible for a machine to be configured with
multiple IPv4 loopback interfaces. Increase specificity of filter to
check on only the object we expect.

Fixes: nodejs#14654
@icarter09
Copy link
Contributor

@Trott I tried applying both of the solutions you posed and neither work for me. I'm running the test on a Raspberry Pi 3 with Lubuntu, kernel version 4.4.38

@Trott
Copy link
Member

Trott commented Aug 8, 2017

@icarter09 What's the output of ./node -e "console.log(os.networkInterfaces().lo.filter((e) => e.address === '127.0.0.1'))" on your device?

@icarter09
Copy link
Contributor

icarter09 commented Aug 8, 2017

output of ./node -e "console.log(os.networkInterfaces().lo.filter((e) => e.address === '127.0.0.1'))"

[ { address: '127.0.0.1',
netmask: '255.0.0.0',
family: 'IPv4',
mac: '00:00:00:00:00:00',
internal: true } ]

@topquant
Copy link
Author

topquant commented Aug 8, 2017 via email

@icarter09
Copy link
Contributor

Just noticed that I'm getting the same error as this post.

https://gist.github.com/Sharan-ram/e110dcde9cc1719e5cdb17ed7e70eab2

@Trott
Copy link
Member

Trott commented Aug 8, 2017

@icarter09 That does not look related to this issue. That's a C++ test failure. Might (or might not) be related to #14206.

@topquant I've got that fix ready to go in #14655. Should (hopefully) land in master in another day or two.

@Trott Trott closed this as completed in 2923ed1 Aug 10, 2017
addaleax pushed a commit that referenced this issue Aug 10, 2017
The check for `os.networkInterfaces()` in `test-os.js` may be too
strict. It's apparently possible for a machine to be configured with
multiple IPv4 loopback interfaces. Increase specificity of filter to
check on only the object we expect.

PR-URL: #14655
Fixes: #14654
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 19, 2017
The check for `os.networkInterfaces()` in `test-os.js` may be too
strict. It's apparently possible for a machine to be configured with
multiple IPv4 loopback interfaces. Increase specificity of filter to
check on only the object we expect.

PR-URL: #14655
Fixes: #14654
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os Issues and PRs related to the os subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants