summaryrefslogtreecommitdiff
path: root/test/monkey9p.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/monkey9p.zig')
-rw-r--r--test/monkey9p.zig10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/monkey9p.zig b/test/monkey9p.zig
index d6568d1e..f33c58f8 100644
--- a/test/monkey9p.zig
+++ b/test/monkey9p.zig
@@ -15,8 +15,9 @@
//! directories and working directory, so a panic or a hang is a failure
//! the parent reports and shrinks like any other.
//!
-//! What T1 leaves out: Session performs no effects (no shell runs, nothing
-//! is saved or dumped, a Restore hangs nothing up), and no 9P engine stands
+//! What T1 leaves out: Session performs few effects (no shell runs, nothing
+//! is saved; a Dump goes to its state in memory, and a Restore puts a new
+//! core in the old one's place, its fids gone as a hang-up's), and no 9P engine stands
//! in front of the core, so the engine's own refusals (a write on an open
//! for reading, a directory opened to write, a mode bit missing) and
//! OTRUNC's truncation first are made here, as cloud9's fs.zig makes them.
@@ -78,7 +79,7 @@ const builtins = [_][]const u8{
"Sort", "Font", "Local",
};
const pane_files = [_][]const u8{ "name", "body", "tag", "ctl", "addr", "dot", "limit", "data", "xdata", "sel", "dirty", "mark", "scroll", "errors", "event", "look", "exec", "tagexec", "pty", "pty/run", "pty/data", "pty/ctl", "pty/status" };
-const root_files = [_][]const u8{ "README", "index", "status", "focus", "ctl", "commands", "recent", "look", "exec", "log", "screen", "listeners", "layout", "tag", "tagexec", "pane", "pane/new", "col", "" };
+const root_files = [_][]const u8{ "README", "index", "status", "focus", "ctl", "commands", "recent", "dumps", "look", "exec", "log", "screen", "listeners", "layout", "tag", "tagexec", "pane", "pane/new", "col", "" };
const long_x: [300]u8 = @splat('x');
const col_files = [_][]const u8{ "tag", "ctl", "exec" };
const writable = [_][]const u8{ "ctl", "exec", "look", "tag", "tagexec", "focus", "body", "data", "xdata", "addr", "dot", "limit", "name", "sel", "dirty", "mark", "scroll", "errors", "event", "pty/run", "pty/data", "pty/ctl", "log" };
@@ -931,6 +932,9 @@ fn exec(c: *Ctx, a: Allocator, res: *Res, op: Op) anyerror!void {
for (c.handles.items) |*h| _ = c.s().ask(&h.fid.w, .clunk, .{});
c.handles.clearRetainingCapacity();
c.marker = null;
+ // The log's follower with them: the new core's log is its own.
+ c.follower = null;
+ c.lines.clearRetainingCapacity();
},
.host => |o| if (o.data) |data| try putFile(a, c.root, o.name, data) else removeFile(a, c.root, o.name),
.seq => |ops| for (ops) |sub| try exec(c, a, res, sub),