From b5fa0b7e8f7d69dc34e3e832eaf4f56805e78dd2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 17:07:16 -0300 Subject: test: review of the fsb port: the held ctl line (no newline, 20000 bytes, run at the close, its failure in the log) moved to T1 (test/behaviour/limits.zig), the process case dropped from test/process/tree.zig; the 256-byte-frame listing checked name by name (entry-00 to entry-23), not by count and prefix; the daemon cases (a killed tty editor, a signalled session) wait for the daemon before their root is removed on a failure's way out too, which left an empty /tmp/pardes-process-* root; each port checked to fail against a further nine breaks ($winid never exported, the dead-socket sweep skipped, the restore record renamed, Unmount let go with a pane open on the mount, /screen re-rendered on a later read, Find's miss reworded, the socket never unlinked on a signal, a closed open's held line dropped, a body's truncate ignored, a Python block given one Enter); behaviour, process, fs-unit and core tests and the rest of fs.py pass Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/process/flags.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/process/flags.zig') diff --git a/test/process/flags.zig b/test/process/flags.zig index 2ae8d0c7..a6797901 100644 --- a/test/process/flags.zig +++ b/test/process/flags.zig @@ -701,6 +701,8 @@ fn killedTty(gpa: std.mem.Allocator, exe: [:0]const u8) !void { const a = arena.allocator(); var d = try process.Detached.start(gpa, exe, "killed", .{}); defer d.deinit(); + // Before the deinit, a failure's way out too: else the root comes back. + defer daemonGone(&d); // Killed with SIGTERM or SIGHUP, a tty editor puts its terminal back // (main screen, cooked mode) before it dies, and its 9P socket goes // with it. One a dead editor left (no process has its pid) is swept at @@ -761,6 +763,7 @@ fn signalCleansUp(gpa: std.mem.Allocator, exe: [:0]const u8) !void { for ([_]libc.SIG{ .TERM, .INT, .HUP }) |first| { var d = try process.Detached.start(gpa, exe, "sig", .{ .env = &.{.{ "PARDES_DAEMON", "on" }} }); defer d.deinit(); + defer daemonGone(&d); try std.testing.expect(d.exists("pardes-9p-sig.sock")); var sig = first; if (sig == .HUP) { @@ -773,6 +776,5 @@ fn signalCleansUp(gpa: std.mem.Allocator, exe: [:0]const u8) !void { const deadline = process.nowMs() + 5_000; while (d.exists("pardes-9p-sig.sock") and process.nowMs() < deadline) process.nap(10); try check(!d.exists("pardes-9p-sig.sock"), "{t}: the socket left", .{first}); - daemonGone(&d); } } -- cgit v1.3