diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 12:44:57 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 6fc9f416938b59b665b1fddc052402770a21cc3f (patch) | |
| tree | 632e83ae787b6e1d231683514663188d3e73e4b9 /test/fs_namespace.zig | |
| parent | c8a3ecc3bcb36f0259f4d8ad2e0cdfcdc3183c9f (diff) | |
| download | pardes-6fc9f416938b59b665b1fddc052402770a21cc3f.tar.gz pardes-6fc9f416938b59b665b1fddc052402770a21cc3f.zip | |
A Restore answers its writer before hanging up, and the log records dumps and restores
A client that wrote Restore saw its connection cut with no answer, and could
not tell a Restore from a crash. The listener now lets the writer's answer out
before the cut, and cuts only the old editor's connections, refusing their
requests meanwhile; a client that dials during it is the new editor's and
stays. Dump logs 'dump <path>' and the restored editor's log 'restore <path>'.
Keeping connections across a Restore was weighed and left: the fids name the
old editor's panes and opens, so it would mean carrying serials and open
records into the new one, where acme's Load only adds windows. tty's Restore
also closed its shells' ptys without reaping them; it retires them now.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/fs_namespace.zig')
| -rw-r--r-- | test/fs_namespace.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/fs_namespace.zig b/test/fs_namespace.zig index 822577d8..2f78ca1a 100644 --- a/test/fs_namespace.zig +++ b/test/fs_namespace.zig @@ -88,7 +88,7 @@ test "transactional restore preserves host capabilities and advances pane identi p.fs.tcp_address = .{ .ip4 = .loopback(5640) }; p.fs.quic_address = .{ .ip6 = .loopback(5641) }; try pardes.dump.dumpState(p); - const restored = try pardes.dump.restore(p, p.dump_out.?); + const restored = try pardes.dump.restore(p, p.dump_out.?, "test"); defer restored.deinit(); try std.testing.expectEqual(@as(u32, 41), restored.lsp_seq); try std.testing.expectEqual(@as(u32, 73), restored.pipe.seq); @@ -103,6 +103,7 @@ test "transactional restore preserves host capabilities and advances pane identi try std.testing.expectError(error.BadDumpMagic, pardes.dump.restore( p, ".{ .magic = \"wrong\", .screen = .{.cols = 80, .rows = 24} }", + "test", )); try std.testing.expect(p.panes[0] == pane); try std.testing.expectEqualStrings("before\n", pane.file.?.content); |
