Repository navigation
perf(test): run Rust test shards in lanes on private displays - #1965
Conversation
…paration check Under load the third paste's unblocked conflict check could outlast the 350 ms progress delay and show its own preparing row, which the cancelled case then mistook for the cancelled row taking over. Refs lgse#1962
The keyboard fixture gives its dispatcher a private history, so each NavigationHistory::shared() call reopened the shared one from a file the background writer might not have saved yet. Refs lgse#1962
GTK tests serialize per display, so a shard on one Xvfb uses about one core. Each shard now splits its tests across lanes, each with its own Xvfb and D-Bus session, under the same receipt and exactly-once check. Local runs are one shard with a lane per two CPUs (--jobs N), CI shards run three lanes, and --refresh-timings rewrites per-test balancing weights measured with libtest's report-time. Closes lgse#1962
The delete queue stopped every worker at the first error, so when a folder was kept only by an open file, whatever the other workers had not reached yet stayed behind. Which items those were depended on scheduling, and a merge's stage could keep a replaced original and be reported as a generic failure instead of as still open. Such a folder now records its error and lets the other jobs finish; its parents stay, and other errors still stop the delete at once. Closes lgse#1964
A folder kept by an open file defers its error so the rest of a delete finishes, but the queue kept only the first error. A later error that stopped the queue was then dropped and the result named only the open folder. Keep deferred errors apart and let a stopping error win. Also reject quality.sh test options the CI task cannot use before the container starts, and name the lane logs when a shard starts.
Code review findings and fixesFixed in 8330769. 1. A deferred "still open" error could hide the error that stopped the delete (bug, low–medium; NFS/SMB only)
The user saw only "Could not delete “open”: A file in it is still open…", while other items were also left for a reason nobody reported. That contradicts the new paragraph in Fix: Test: 2.
|
…965-parallel-test-lanes
…hreads Rootless Podman caps a container at 2048 tasks. With one lane per two CPUs on a 32-CPU host, the lanes' libtest threads and GTK children exceed that, thread spawns fail with EAGAIN, and the tests waiting on them hang the run.
ReviewMerged One blocker, fixed in 371d5ce: on a rootless Podman host, Validation
Not changed: |
Description
Rust tests ran one GTK test at a time per machine. Every GTK test runs in a child process, and every child of a test process waits on one lock because children on one display share its clipboard and pointer grabs. So the 844 GTK tests (about 924 s of serial time) queue on a single Xvfb, whatever the core count. Locally,
./scripts/quality.sh testtook about 16 minutes of test time on 24 CPUs, and each CI shard used about one of its four vCPUs for 230–265 s.scripts/quality_ci.py runnow splits a shard's tests across lanes. Each lane runs its libtest processes under its own Xvfb server and private D-Bus session, and all lanes run at once. The shard's receipt, the plan checks, the isolated deferred-scroll process andverify's exactly-once check are unchanged. A failed lane fails the shard after the others finish, and lane logs are written while tests run../scripts/quality.sh testbuilds one shard and runs it with one lane per two CPUs. The new--jobs Noption sets the lane count (--jobs 1gives the old single display). A failing run prints the failed tests' panics, without the expected panics that passing tests print../scripts/quality.sh test --jobs 3. Shard logs are uploaded withalways(), so a timed-out shard still has its logs../scripts/quality.sh test --refresh-timings(opt-in) measures every test with libtest's--report-time(behindRUSTC_BOOTSTRAP=1), using one thread per process so GTK lock waits don't count. It refuses to write unless it measured exactly the runnable tests, then rewritesscripts/quality-durations.jsonfor all 3712 runnable tests. Before, the file had hints for only 35. Tests in a GTK child keep their full time; other tests share libtest's threads, so they count for a quarter of their time.NavigationHistory::shared(), which the keyboard fixture never holds. So each call, and then the search, reloaded the history from a file the background writer might not have saved yet. It failed 2 times in 96 at 2× load, and 0 in 96 after the fix.Measurements, all in the pinned image:
quality.sh test, 24 CPUsShard times on 4 CPUs were 127 s with 2 lanes and 70 s with 4. At 6 lanes on 4 CPUs (and 24 on 24), load-sensitive tests failed.
Visual evidence
N/A: test harness, CI and a deletion change visible only as which items remain after an error, described above.
How to test
./scripts/quality.sh test. It prints one line per lane, thenVerified 3712 passed tests exactly once; 619 explicitly ignored by libtest../scripts/quality.sh test --jobs 1. It runs everything on one display and gives the same verified counts../scripts/quality.sh fmt --jobs 2and./scripts/quality.sh test --jobs 0. Both exit 2 with the usage line, without starting a container../scripts/quality.sh test --refresh-timings. It writesscripts/quality-durations.json, and the diff only changes values.tree/open/in another program, then permanently deletetree, which also contains other files and folders. Everything excepttree/openandtreeis deleted, and the error namesopenas still open.Expected result: every run verifies all runnable tests exactly once, and local and CI shard times drop to about 90 s.
Related issue
Closes #1962
Closes #1964