summaryrefslogtreecommitdiff
path: root/test/process
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 09:10:24 -0300
committerGabriel Schneider <[email protected]>2026-11-21 09:10:24 -0300
commitc4f7bb9477c7aa4c8864f14edb9e85b6c8c08437 (patch)
tree9b60bce9e53f96855b40f2ba53e23945a7798ddf /test/process
parentf7de6f49ee3d9ac241575f5244743193c9943841 (diff)
parent5ad6067936f306271b875aaf182d4866055da10d (diff)
downloadpardes-c4f7bb9477c7aa4c8864f14edb9e85b6c8c08437.tar.gz
pardes-c4f7bb9477c7aa4c8864f14edb9e85b6c8c08437.zip
integration: the pair's round 5 and the layers' round 2 on the gathered line: pardes-pair-5 (`ssrtxkzx`, on pardes-merge48: a link an Upgrade cuts with no last word asks the daemon whether its session is listed still and joins again (`replica.cutListed`): an upgrade from the installed build carries its clients; a no-daemon pair refuses Restore in words (P42); /dev/tty opened before the pair forks; a TERMed or hung-up client dies of the signal; the process suite as pairs 13 to 8 of 145) and pardes-layers-2 (`myxnnquu`, on pardes-merge49: the click on path@rev tested, a revision read-only from 9P, Syntax off in a patch keeps the patch's colours); no conflict; core-test 893/1053 (160 skipped), shell-test 1095/1098; its gate: .scratch/sketch/reorg/merge50, the numbers in PARDES.md (2026-11-21)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/process')
-rw-r--r--test/process/flags.zig4
-rw-r--r--test/process/root_ctl.zig3
-rw-r--r--test/process/tty_boot.zig2
3 files changed, 8 insertions, 1 deletions
diff --git a/test/process/flags.zig b/test/process/flags.zig
index c9aa12fb..cfdb1faf 100644
--- a/test/process/flags.zig
+++ b/test/process/flags.zig
@@ -730,7 +730,9 @@ fn killedTty(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
killed.kill(sig);
try exitsWith(&killed, -@as(c_int, @intCast(@intFromEnum(sig))), 5_000);
const own_z = z(a, "{s}", .{own});
- if (sig == .HUP) {
+ // As a pair (PARDES_PAIR) a hangup is a close (P36): the session,
+ // its last client gone and not kept, ends with it.
+ if (sig == .HUP and std.c.getenv("PARDES_PAIR") == null) {
// A hangup is the terminal's end: the session carries on
// detached (the daemon keeps it) until told to end.
try check(libc.access(own_z, 0) == 0, "a hangup ended the session", .{});
diff --git a/test/process/root_ctl.zig b/test/process/root_ctl.zig
index e3420ac5..979cfc48 100644
--- a/test/process/root_ctl.zig
+++ b/test/process/root_ctl.zig
@@ -127,6 +127,9 @@ fn restore(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer d.deinit();
var term: ?process.Child = null;
defer if (term) |*t| t.deinit();
+ // As a pair, with a daemon of the root's own: the Restore lets its
+ // client go, and it joins again through it (P42).
+ if (tty) d.tty_daemon = exe;
if (tty) term = try d.startTty(exe, name, &.{});
const address = d.abs(try std.fmt.allocPrint(a, "pardes-9p-{s}.sock", .{name}));
const old = try Conn.dial(gpa, address);
diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig
index 741f6260..51aea53b 100644
--- a/test/process/tty_boot.zig
+++ b/test/process/tty_boot.zig
@@ -271,6 +271,7 @@ fn load(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn restore(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "restore");
defer t.deinit();
+ t.privateDaemon();
try t.start(31, 100, &.{ "-n", "1" });
try t.wait(8000, "Newcol Joincol");
try t.stable(700, 20000);
@@ -380,6 +381,7 @@ fn headersweep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn headersweep_restored(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "headersweep-restored");
defer t.deinit();
+ t.privateDaemon();
try t.start(21, 120, &.{ "-n", "3" });
try t.wait(8000, "Newcol");
try t.stable(700, 20000);