Repository navigation
test: stress, fuzz, and run the spawn where bounded tests stop - #39
Merged
Merged
Conversation
P4suta
added this pull request to stack #37
October 13, 2026 13:24
P4suta
force-pushed
the
test/deep-checks
branch
from
October 13, 2026 13:31
21416dc to
8fcc3dc
Compare
P4suta
marked this pull request as ready for review
October 13, 2026 13:48
P4suta
marked this pull request as draft
October 13, 2026 14:08
P4suta
force-pushed
the
test/deep-checks
branch
from
October 13, 2026 14:10
8fcc3dc to
72fc873
Compare
P4suta
force-pushed
the
test/deep-checks
branch
from
October 13, 2026 14:31
72fc873 to
92e11fe
Compare
P4suta
marked this pull request as ready for review
October 13, 2026 14:56
Owner
Author
|
@coderabbitai pause |
✅ Action performedReviews paused. |
P4suta
marked this pull request as draft
October 13, 2026 15:42
The ignored test `spawn_cleanup_stress` spawns children in thirteen modes, `WINDOWS_SPAWN_STRESS_CASES` times in all. The modes cover both commits, a dropped suspended child, collected output, written input, a killed tree, transferred handles, a Job, an alternate parent, and two failed spawns. It requires the process's handle count to end where it started, after a warm-up that runs each mode twice. On Windows 11, 1300 spawns left the count at 86, where it started. `WINDOWS_SPAWN_RANDOM_SCALE` multiplies the random command lines and environments, which keep their seeds. `tests/argv_roundtrip.rs` propagates its errors instead of calling `expect`, and adopts handles without `as`. The file-wide lint exception and its three registry entries go away. Refs #38
A `fuzz` crate compiles `command_line_rules.rs` and `environment_rules.rs` from `src/domain`. Its `command-line` target requires both C runtime parser models to read back the program name and every argument it encodes. Its `environment-block` target requires a built block to end where `scan` finds its end and to read back as its variables, in order. The parser models and the block scan compile under `cfg(fuzzing)` for them, and the models name the backslash pair they count. The fuzz crate forms its own workspace, so the package, the MSRV, and the workspace lints leave it out. The repository gate checks its targets, and `REUSE.toml` states the license of its files. A broken encoder, which drops the backslashes before a closing quote, failed the `command-line` target within seconds. Refs #38
Every PR now runs 1300 stress spawns on x64 and i686, the Windows tests under `cargo careful`, and `cargo xtask test` on Windows 11 ARM64. It also runs Miri and AddressSanitizer over the platform-neutral decisions, and each fuzz target for ten minutes. `required` waits for each of these jobs. A nightly workflow runs the stress test 100000 times on x64 and 20000 times on i686. It also runs the random cases at fifty times their size, and each fuzz target for five hours. ADR 0017 records what each check covers and credits #14, and CONTRIBUTING shows how to run them. Refs #38
…cess The first ARM64 run showed that Windows on ARM64 gives every child `PROCESSOR_ARCHITECTURE`, even a child whose environment the command cleared. The random environment test now leaves that variable out, as it leaves out the variables that `appverif.exe` and the profile runtime set. `Command::env_clear` states the behavior. Refs #38
zizmor reported the matrix values that the stress and fuzz steps expanded into their scripts. The stress jobs now name their target through `CARGO_BUILD_TARGET`, and the fuzz jobs through `FUZZ_TARGET`, so no script expands a template. The nightly workflow also runs one deep run at a time. Refs #38
P4suta
force-pushed
the
test/deep-checks
branch
from
October 13, 2026 15:42
92e11fe to
b041a97
Compare
P4suta
marked this pull request as ready for review
October 13, 2026 16:11
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.
Summary
Closes #38.
This PR stacks on #36.
It brings back the checks of #14 that main dropped, and each one now checks a property rather than an absence of panics.
spawn_cleanup_stressspawns children in thirteen modes and requires the process's handle count to end where it started.The modes cover both commits, a dropped suspended child, collected output, written input, a killed tree, transferred handles, a Job, an alternate parent, and two failed spawns.
cargo careful, whose standard library checks the preconditions of the unsafe operations insys.cargo xtask teston a Windows 11 ARM64 runner.fuzzcrate compiles the encoder and the block builder fromsrc/domain.Its targets require the parser models to read back every program name, argument, and variable they encode.
WINDOWS_SPAWN_RANDOM_SCALEmultiplies the random command lines and environments, which keep their seeds.tests/argv_roundtrip.rspropagates its errors instead of callingexpectand adopts handles withoutas.Its file-wide lint exception and three registry entries go away.
The first ARM64 run found that Windows on ARM64 gives every child
PROCESSOR_ARCHITECTURE, even a child whose environment the command cleared.The random environment test now leaves that variable out, and
Command::env_clearstates the behavior.Validation
On Windows 11, x64:
cargo xtask testpassed.cargo careful testpassed 70 unit tests, 34 integration tests, and 36 xtask tests.On macOS, Apple silicon:
command-lineand 8.9 million forenvironment-block.command-linetarget failed within seconds.cargo xtask gates, and the xtask tests passed.actionlint,reuse lint, andtypospassed.zizmorreports nothing on the new jobs.In this PR's CI:
cargo xtask testpassed 73 unit tests, 36 integration tests, 36 xtask tests, every Lean row, and every random case.command-lineand 32.2 million forenvironment-block.cargo carefulpassed.The nightly workflow runs once this PR reaches
main, because GitHub dispatches only a workflow that the default branch holds.The owner has paused CodeRabbit, so its review of this PR waits for the owner to resume it.
Checklist
@coderabbitai ignore