Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
test: improve flaky test-listen-fd-ebadf.js#17797
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Trott commented Dec 20, 2017 • edited by gibfahn
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by gibfahn
Uh oh!
There was an error while loading. Please reload this page.
Trott commented Dec 20, 2017
Ping @gibfahn |
Trott commented Dec 20, 2017
gibfahn commented Dec 20, 2017
Seems reasonable, let me try it on the machine that was failing. |
gibfahn commented Dec 20, 2017
descripter -> descriptor in the commit message btw |
Find an invalid file descriptor rather than assuming 42 will be invalid. Fixes: nodejs#17762
gibfahn commented Dec 20, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
$ tools/test.py -J --repeat 1000 parallel/test-listen-fd-ebadfCommand: out/Release/node /dev/shm/gib/node/test/parallel/test-listen-fd-ebadf.js[00:08|% 100|+ 980|- 20]: Done $ tools/test.py -J --repeat 1000 parallel/test-listen-fd-ebadf-trott[00:08|% 100|+ 1000|- 0]: DoneLooks like that fixes it, thanks @Trott ! EDIT: Since the machine is idle, why not do a proper stress test: $ tools/test.py -J --repeat 100000 parallel/test-listen-fd-ebadf-trott[25:31|% 100|+ 100000|- 0]: Done |
Trott commented Dec 21, 2017
(CI issues are infra-related, unrelated to this PR.) |
Trott commented Dec 21, 2017
Landed in 1d87891 |
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: nodejs#17797Fixes: nodejs#17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
gibfahn commented Jan 24, 2018
Doesn't land cleanly on 6.x. Assuming this test is flaky there too, a backport would be useful. Diff: diff --git a/test/parallel/test-listen-fd-ebadf.js b/test/parallel/test-listen-fd-ebadf.js index dfa99e274a..8153803e30 100644 --- a/test/parallel/test-listen-fd-ebadf.js+++ b/test/parallel/test-listen-fd-ebadf.js@@ -1,11 +1,29 @@ 'use strict'; const common = require('../common'); + const assert = require('assert'); +const fs = require('fs'); const net = require('net'); net.createServer(common.mustNotCall()).listen({fd: 2}) .on('error', common.mustCall(onError)); +<<<<<<< HEAD net.createServer(common.mustNotCall()).listen({fd: 42}) +||||||| parent of 1d8789188f... test: improve flaky test-listen-fd-ebadf.js+net.createServer(common.mustNotCall()).listen({fd: 42 })+=======++let invalidFd = 2;++// Get first known bad file descriptor.+try{+ while (fs.fstatSync(++invalidFd));+} catch (e){+ // do nothing; we now have an invalid fd+}++net.createServer(common.mustNotCall()).listen({fd: invalidFd })+>>>>>>> 1d8789188f... test: improve flaky test-listen-fd-ebadf.js .on('error', common.mustCall(onError)); function onError(ex){ |
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Trott commented Jan 25, 2018
@gibfahn Merge conflict is caused by #14162 which added whitespace but hasn't yet been backported. Backport was requested in October so I guess it's not coming. That's unfortunate, because all those whitespace changes are likely to cause further merge conflicts. Oh well. At least it's easy to resolve: Remove the line from HEAD and keep all the lines from this PR. Done! |
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: nodejs#17797Fixes: nodejs#17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Trott commented Jan 25, 2018
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Find an invalid file descriptor rather than assuming 42 will be invalid. PR-URL: #17797Fixes: #17762 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Find an invalid file descriptor rather than assuming 42 will be invalid.
Fixes: #17762
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test net