Repository navigation
tests: keep the Linux tests true with Ubuntu 26.04's coreutils - #1554
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoNov 12, 2026
Merged
Conversation
On Ubuntu 26.04, head is uutils' head, and `head -c N` grows its output pipe to N bytes, up to 1 MiB, before it copies them. Three tests have `head -c` write more than a pipe of the default 64 KiB holds, expecting it to block until the reader takes some: - guest::exec::tests::a_stalled_sink_stalls_only_its_own_execution_and_loses_nothing wrote 256 KiB, which its grown pipe held whole, so head ended, its standard error closed, and the stalled execution had an event to report. It failed on every ubuntu-latest runner once that label moved to Ubuntu 26.04. - guest::exec::tests::cancellation_ends_a_stalled_program_and_the_caller_discards_the_rest wrote 256 KiB after 4 KiB, which still overfills a pipe grown to 256 KiB, but which a head that grows it more would not. - guest::managed_agent::dispatch::tests::output_beyond_the_cap_ends_the_workload_after_the_reads_that_fit wrote 1.5 MiB, of which a grown pipe holds 1 MiB, so head could end and the workload leave its marker once the agent had read 0.5 MiB, before the agent read beyond its 1 MiB cap and ended the workload. Each now writes more than a pipe holds even once the program grows it: 4 MiB in the exec tests, and 3 MiB in the dispatch test, which head can finish only once the agent has read 2 MiB. This ports aa144f7 of feature/nvx-refactor (#1535) to dev, whose three tests were the same. On dev, the first failed the same way, at src/guest/exec/tests.rs:318, in the nvx-rs / ubuntu-latest job of run 43269651949 on the ubuntu-26.04 image. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
test_linux_runners_terminate_openvmm_left_by_earlier_jobs copied sleep to a uniquely named stand-in, which the step under test finds by its process name. On Ubuntu 26.04, sleep is uutils' multi-call coreutils, which picks its program by the name of the file that it runs, so the stand-in ended at once with "coreutils: unknown program 'nvx-leak-...'", and the step found nothing to terminate. Running the copy with argv[0] set to sleep doesn't help: uutils' glibc build, which Ubuntu ships, takes the path that the kernel ran (AT_EXECFN) over argv[0]. The stand-in is now a link to the Python interpreter, named for the stand-in, that sleeps: the kernel names the process after the link, and Python runs under any name. The test expects the step to print that command line. This ports 35af82a of feature/nvx-refactor (#1535) to dev, whose test was the same. On dev, it failed the same way, with "coreutils: unknown program 'nvx-leak-2581'", in the NVX CLI / Linux job of run 43269651949 on the ubuntu-26.04 image. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
This pull request changes existing testsIt modifies or removes 4 existing test asset(s), listed below. Review each with care: a change to a test can hide a regression that the test caught. See doc/contribute.md#changes-to-existing-tests. Test code
Relocated unchanged: 0; added: 1. Compared the merge base |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the Linux test compatibility updates.
No open issues 🎉
What changed in this PR
Updates Linux tests to work with Ubuntu 26.04’s uutils coreutils, addressing #1537 without changing production code or pinning CI runners.
Changes:
- Increases test output sizes so pipe growth cannot undermine backpressure, cancellation, or output-limit checks.
- Replaces the renamed
sleepexecutable with a Python-based stand-in for leaked-process cleanup tests.
| File | Description |
|---|---|
scripts/test_nvx_tools.py |
Uses a named Python symlink as the leaked-process stand-in and updates expected command output. |
nvx-rs/src/guest/managed_agent/dispatch/tests.rs |
Raises workload output to 3 MiB to preserve the output-limit test’s blocking behavior. |
nvx-rs/src/guest/exec/tests.rs |
Uses a shared 4 MiB output size for stalled-sink and cancellation tests. |
Review effort: Balanced
Pedro Henrique Penna (ppenna)
deleted the
agents/issue-1537-ubuntu-2604-coreutils
branch
November 12, 2026 18:43
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1537
What and why
Between 11:22 and 11:47 UTC on 2026-11-12, GitHub moved
ubuntu-latestfrom Ubuntu 24.04 to Ubuntu 26.04 (imageubuntu-26.0420261101.186.1), wherecoreutilsis uutils' Rust multi-call coreutils (rust-coreutils0.10.0) rather than GNU's. Two tests thatdevcarries assume GNU coreutils, so everydevpull request now failsRequired status check. The firstdev-based run on 26.04, #1551's 43269651949 ata159c4a0b0a, failed exactly these two jobs:nvx-rs / ubuntu-latest:guest::exec::tests::a_stalled_sink_stalls_only_its_own_execution_and_loses_nothingpanicked atsrc/guest/exec/tests.rs:318:5(1901 library tests passed, 1 failed).NVX CLI / Linux:test_linux_runners_terminate_openvmm_left_by_earlier_jobsfailed withcoreutils: unknown program 'nvx-leak-2581'(2198 tests,failures=1, errors=1, both from that test).Both are test assumptions, not product bugs, so this fixes the tests and pins no runner. It ports the two commits of #1535, which fixed the same tests on
feature/nvx-refactorand passed on 26.04 in 43220514149.dev's copies of the four tests were identical tofeature/nvx-refactor's before those commits, and both commits apply unchanged; their messages only add where they come from and how the tests failed ondev:tests: outgrow the pipe that uutils' head grows, fromaa144f7c091. WhenNis more than 64 KiB, uutils'head -c Nfirst grows its output pipe withF_SETPIPE_SZtomin(N, 1 MiB)(send_n_bytesat 0.10.0). Sohead -c 262144fit in its pipe instead of blocking, ended, and closed its standard error, which gave the "stalled" execution an event to report. The test now writesMORE_THAN_A_PIPE_HOLDS, 4 MiB, since a program without privileges can grow a pipe to/proc/sys/fs/pipe-max-size, 1 MiB by default, at most. Two tests that pass on 26.04 only by margin change too:cancellation_ends_a_stalled_program_and_the_caller_discards_the_rest, which passed only because uutils grows its pipe to exactly 256 KiB, now writes 4 MiB, andguest::managed_agent::dispatch::tests::output_beyond_the_cap_ends_the_workload_after_the_reads_that_fit, whose 1.5 MiB could finish in a 1 MiB pipe once the agent had read 0.5 MiB, now writes 3 MiB.tests: run the leaked-OpenVMM stand-in as Python, from35af82af156. The test copiedsleepto a stand-in namednvx-leak-<pid>, which the step under test finds by its process name. uutils' multi-call binary picks its program by the name of the file that it runs, so the copy exited at once, and settingargv[0]doesn't help, since the glibc build that Ubuntu ships takes the path that the kernel ran (AT_EXECFN) overargv[0](validation.rsat 0.10.0). The stand-in is now a link, named for the stand-in, to the Python interpreter, which sleeps, and the test expects the command line that the step prints. Everything else that it checks is unchanged.Other GNU coreutils assumptions on
dev.devstill carries test code thatfeature/nvx-refactorhas deleted, which #1535's run therefore never exercised on 26.04:nvx-rs/src/guest/exec/binding/tests.rs, the runtime adapter intests/runtime-adapter/, the integration testsnvx-rs/tests/{fake_openvmm,managed_lifecycle,store,supervisor,template_capture}.rs, and the artifact bundling step. I searched them, and the other tests and CI scripts that run onubuntu-latest, forhead -c, for the other uutils programs that grow a pipe (tail,tee,yes, andcatthroughsplice), and for coreutils programs run under another name. None needs a change:head -cwrite 24 or 32 KiB, for which uutils doesn't grow the pipe, or 16 MiB, which no pipe holds, and theircat /dev/zeronever ends. All of them passed on 26.04 in 43269651949.seq,sleep,env,true, andcatcopying its input or/dev/zero, none of them under another name or counting on a pipe's size; itsyestest only simulates the program.host::process::tests::linux::a_process_whose_command_name_is_not_utf8_can_be_examinedrunssleepthrough a link with another name, withargv[0]set tosleep. It passed on 26.04 in both 43269651949 and 43220514149, and printed nounknown program.The runtime adapter, the integration tests, and the steps after the library tests of
nvx-rs / ubuntu-latestdidn't run in 43269651949, which stopped at the first failure; this pull request's run, below, passed them on 26.04.Size. Test code only, in two Rust test files and one Python test module. No public API, contract, or version changes.
Validation
nvx-kvm-test(virtual machine, Azure Linux 3.0, kernel 6.6), temporary worktree at90cbd4554ac:cargo test --locked --all-features --lib -- --exactwith the three changed tests anda_process_whose_command_name_is_not_utf8_can_be_examined, 3 rounds each with GNU coreutils 9.4 and with uutils 0.10.0 first inPATH83764f5ab0f) test files, same commanda_stalled_sink_...panics atsrc/guest/exec/tests.rs:318:5in all 3 rounds, as in CI; with GNU coreutils, all passpython3 -m unittest scripts.test_nvx_tools.CiConfigurationTests.test_linux_runners_terminate_openvmm_left_by_earlier_jobs, twice each with GNU coreutils and with uutils 0.10.0coreutils: unknown program 'nvx-leak-48303',failures=1, errors=1cargo test --locked --all-features --lib -- guest::exec:: guest::managed_agent::dispatch::, with GNU coreutils and with uutils 0.10.0;cargo clippy --locked --all-targets --all-features -- -D warningspython scripts/local_gates.py --base origin/dev --only test-changes markdown-links test-layout nvx-rs-format --runquality-codegate:ruff checkandruff format --checkofscripts .github/specula,compileall,pyright --pythonplatform LinuxandWindowsshellcheckandshfmtdidn't run, since Docker can't mount the checkout from Git Bash here; no shell script changes90cbd4554ac, whose Linux jobs ran on imageubuntu-26.0420261101.186.1Required status checkincluded.nvx-rs / ubuntu-latestran all its steps, which 43269651949 never reached: the library tests (1902 passed, 19 ignored), the integration and doc tests, the bundling check, the guest binaries, and the runtime adapter in its three configurations, with nounknown programin its log.NVX CLI / Linuxran 2198 tests (OK, 36 skipped) and the 84 adversarial testsuutils 0.10.0's glibc build needs glibc 2.39, which the host's 2.38 lacks, so the host ran the release's musl build. It grows pipes as the glibc build does, but it reads
argv[0]rather thanAT_EXECFN. No Ubuntu 26.04 machine was available apart from GitHub's runners, so this pull request's run onubuntu-latest, above, is the authoritative check.Tests modified
python scripts/check_test_changes.py --base origin/devlists 4 changes to existing tests, plus 1 addition, the constantMORE_THAN_A_PIPE_HOLDS. Each change keeps what the test checks:a_stalled_sink_stalls_only_its_own_execution_and_loses_nothingwrites 4 MiB instead of 256 KiB, so its program still blocks once uutils'headgrows its pipe.cancellation_ends_a_stalled_program_and_the_caller_discards_the_restwrites 4 MiB instead of 256 KiB after its first page, for the same reason.output_beyond_the_cap_ends_the_workload_after_the_reads_that_fitwrites 3 MiB instead of 1.5 MiB, so the workload can't finish before the agent reads past its 1 MiB cap.test_linux_runners_terminate_openvmm_left_by_earlier_jobsruns Python through a link named for its stand-in, where it ran a copy ofsleep, which a multi-call coreutils won't run under another name, and expects that command line.The
openvmmgitlink doesn't move.