diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 17:22:24 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | 893e12345c2458e70b333faedaaaaf8fbffb6932 (patch) | |
| tree | 47dcd26228d7144353e6e4b5c239ddf4f920edc7 /build.zig | |
| parent | 9babe3a63ca06b4b0248d1d21ccb74687c5b188d (diff) | |
| download | pardes-893e12345c2458e70b333faedaaaaf8fbffb6932.tar.gz pardes-893e12345c2458e70b333faedaaaaf8fbffb6932.zip | |
A 9P monkey drives random requests at a throwaway session and checks the documented rules
test/monkey9p.py starts pardes --detach with its own HOME, XDG dirs and
runtime dir, speaks raw 9P (test/ninep.py) with a timeout on every reply
and Tflush for held reads, and after each seeded operation checks that
pardes is alive, the one-failure rule over a marker-delimited log window
(with and without a follower), /index against /pane, and chunked against
whole reads. Every run writes a replayable ops log; a failure is saved
with its seed and step, shrunk by delta debugging over replays, and the
run goes on in a fresh session. Teardown makes the fuzzer a subreaper and
kills every process carrying the session's token.
zig build monkey-9p -- --seed N --steps M | --replay F | --shrink F;
a 150-step fixed-seed smoke run is part of fs-test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -1568,7 +1568,25 @@ pub fn build(b: *std.Build) void { if (enable_quic) run_fs_test.addArg("--quic"); run_fs_test.setCwd(b.path(".")); run_fs_test.has_side_effects = true; - b.step("fs-test", "exercise default 9P service and mounts with an independent client").dependOn(&run_fs_test.step); + const fs_test_step = b.step("fs-test", "exercise default 9P service and mounts with an independent client"); + fs_test_step.dependOn(&run_fs_test.step); + + // Random 9P operations against a throwaway detached session, checking + // the documented rules (test/monkey9p.py). The fixed-seed smoke run is + // part of fs-test; the long run is manual. + const run_monkey9p = b.addSystemCommand(&.{ "python3", "-B", "test/monkey9p.py" }); + run_monkey9p.addArtifactArg(exe); + if (b.args) |args| run_monkey9p.addArgs(args); + run_monkey9p.setCwd(b.path(".")); + run_monkey9p.has_side_effects = true; + b.step("monkey-9p", "random 9P operations checking the documented rules (-- [--seed N]... [--steps M] [--replay F] [--shrink F] [--no-shrink])").dependOn(&run_monkey9p.step); + const run_monkey9p_smoke = b.addSystemCommand(&.{ "python3", "-B", "test/monkey9p.py" }); + run_monkey9p_smoke.addArtifactArg(exe); + run_monkey9p_smoke.addArg("--smoke"); + run_monkey9p_smoke.setCwd(b.path(".")); + run_monkey9p_smoke.has_side_effects = true; + b.step("monkey-9p-smoke", "a short fixed-seed 9P monkey run (part of fs-test)").dependOn(&run_monkey9p_smoke.step); + fs_test_step.dependOn(&run_monkey9p_smoke.step); const run_discovery = b.addSystemCommand(&.{ "python3", "-B", "test/fs.py" }); run_discovery.addArtifactArg(exe); |
