diff --git a/changelog.d/+stopgroup-test-iters.misc.md b/changelog.d/+stopgroup-test-iters.misc.md new file mode 100644 index 0000000..ed06c77 --- /dev/null +++ b/changelog.d/+stopgroup-test-iters.misc.md @@ -0,0 +1 @@ +The test that `proc.stopGroup` kills a child whose pgid was only just published runs 50 times instead of 100: without the kill fix it fails within its first three runs either way, and it takes half as long. diff --git a/src/proc_test.zig b/src/proc_test.zig index 8200c39..349a763 100644 --- a/src/proc_test.zig +++ b/src/proc_test.zig @@ -361,7 +361,7 @@ test "stopGroup on a pgid as soon as it is published kills the child" { try linux.sched_setaffinity(0, &one); } defer if (pinned) linux.sched_setaffinity(0, &cpus) catch {}; - for (0..100) |i| { + for (0..50) |i| { stop_pgid.store(0, .seq_cst); const name = A.print("background{d}", .{i}) catch unreachable; const script = A.print("sleep 30 >/dev/null &\necho $! > {s}\nsleep 2\n", .{name}) catch unreachable;