-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: reduce test-hash-seed run time by half #25522
Conversation
Replace min() function with Math.min(...).
(By the way, does anyone know if this test is even valid anymore? I imagine it is, but I don't know where the hash-seed is calculated. It looks like the fixture maybe copies some code from someplace else and therefore might theoretically be out of date? @ofrobots @nodejs/v8 ) |
Lite CI should be sufficient because pummel tests aren't yet run in CI. Here's a custom run to exercise just this test to confirm that it won't time out anymore (or at least won't always time out) in CI: https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/3908/ |
Yes, the test is still relevant. This ensures that we are building V8 in a way to make sure the V8's internal hash seed is not predictable. See CVE-2017-11499. This is not an important attack vector for browsers, so this kind of stuff is likely going to be configuration flag for V8 going forward. The test ensures that we are setting the flag correct and V8 itself is not regressing. |
9eedc23
to
0834196
Compare
IIUC this could be tested with node8 < v8.1.4
[nit] Only on multi-core/hyper-threaded machines. For example our Windows 10 CI machines are single core. |
0834196
to
c1260cf
Compare
Reduce the time it takes to run test/pummel/test-hash-seed by switching from spawnSync() to spawn(). On my computer, this reduces the runtime from about 80 seconds to about 40 seconds. This test is not (yet) run regularly on CI, but when it was run recently, it timed out.
c1260cf
to
6f00801
Compare
Lite CI: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/2260/ Running the test on CI (scheduled): https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/3915/ |
Test still works (after a bit of massage to DEV D:\code\prws>node8.1.3 test\pummel\test-hash-seed.js
Seeds: 60421████,60421████
assert.js:60
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: 1 === 2
at Countdown.requiredCallback (D:\code\prws\test\pummel\test-hash-seed.js:15:10)
at Countdown.<anonymous> (D:\code\prws\test\common\index.js:378:15)
at Countdown.dec (D:\code\prws\test\common\countdown.js:21:22)
at ChildProcess.subprocess.on (D:\code\prws\test\pummel\test-hash-seed.js:29:15)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
DEV D:\code\prws>node8.1.4 test\pummel\test-hash-seed.js
Seeds: 802238064,671715787 |
Landed in 5fdd554...f2e3a4e |
Replace min() function with Math.min(...). PR-URL: nodejs#25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reduce the time it takes to run test/pummel/test-hash-seed by switching from spawnSync() to spawn(). On my computer, this reduces the runtime from about 80 seconds to about 40 seconds. This test is not (yet) run regularly on CI, but when it was run recently, it timed out. PR-URL: nodejs#25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Replace min() function with Math.min(...). PR-URL: #25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reduce the time it takes to run test/pummel/test-hash-seed by switching from spawnSync() to spawn(). On my computer, this reduces the runtime from about 80 seconds to about 40 seconds. This test is not (yet) run regularly on CI, but when it was run recently, it timed out. PR-URL: #25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Replace min() function with Math.min(...). PR-URL: #25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reduce the time it takes to run test/pummel/test-hash-seed by switching from spawnSync() to spawn(). On my computer, this reduces the runtime from about 80 seconds to about 40 seconds. This test is not (yet) run regularly on CI, but when it was run recently, it timed out. PR-URL: #25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Replace min() function with Math.min(...). PR-URL: #25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reduce the time it takes to run test/pummel/test-hash-seed by switching from spawnSync() to spawn(). On my computer, this reduces the runtime from about 80 seconds to about 40 seconds. This test is not (yet) run regularly on CI, but when it was run recently, it timed out. PR-URL: #25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Replace min() function with Math.min(...). PR-URL: #25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reduce the time it takes to run test/pummel/test-hash-seed by switching from spawnSync() to spawn(). On my computer, this reduces the runtime from about 80 seconds to about 40 seconds. This test is not (yet) run regularly on CI, but when it was run recently, it timed out. PR-URL: #25522 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reduce the time it takes to run test/pummel/test-hash-seed by switching
from spawnSync() to spawn(). On my computer, this reduces the runtime
from about 80 seconds to about 40 seconds. This test is not (yet) run
regularly on CI, but when it was run recently, it timed out.
While we're in there, replace min() function with Math.min(...). It's in a separate commit because it's unrelated, but I couldn't bring myself to not do it at all.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes