Repository navigation
test: make the unit suite ~2x faster - #3858
Merged
Merged
Conversation
Every read on the test socket waited out a 5ms SO_RCVTIMEO before returning, and a CDP expectSent miss slept another 5ms on top. Replies are written synchronously, so the test side of the socketpair is now non-blocking and expectSent ticks the page until a 2s deadline instead of sleeping.
Timeout-path tests wait out their whole timeout, so keep those small. Workers queue messages posted before their script runs, so the 100ms delays before postMessage were never needed.
- IntersectionObserver chain: insert sentinels first; appending made every check walk all earlier siblings, so the chain was quadratic. - XPath deep nesting: the recursive evaluator overflowed an 8MB stack at a depth of about 35000 in debug builds, so 50000 still catches a regression at half the cost of 100000. - header_parser: keep every byte at every position, but only for the lengths straddling the vector, SWAR and scalar path boundaries. - Drop the second run of cdata/comment.html, already covered by the cdata directory run.
The goto test reused its 50ms stuck-navigation timeout for the load that must succeed, which a tsan debug build can't finish in time. The script timeout also stays in force for later executeSync calls, so it goes back to 50ms.
karlseguin
reviewed
Oct 8, 2026
The sleep between headers and body made every session test pay for a case it might not even trigger; that case gets its own test.
Collaborator
|
Can you re-run the zig-test job a few times to make sure it passes reliably? |
Contributor
Author
I ran them 4 extra times successfully, both this PR and #3860 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Half of the `make test` wall time was idle: a cached run took 23.7s wall but only ~12s CPU. This removes most of the idle time plus a few oversized CPU loops. It brings a cached `make test` to ~11.8s. Coverage is unchanged.
Harness idle (the bulk of it)
Waited-out timeouts and fixture delays
CPU-heavy tests
Not in this PR