summaryrefslogtreecommitdiff
path: root/test/replicas.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/replicas.zig')
-rw-r--r--test/replicas.zig12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/replicas.zig b/test/replicas.zig
index 15dc89f1..280b85f4 100644
--- a/test/replicas.zig
+++ b/test/replicas.zig
@@ -23,7 +23,7 @@
//!
//! Gates, per seed and RTT: no replica diverges (every confirmed unit's
//! digests agree as it is replayed), and at quiescence every replica's
-//! digest is the authority's; every delta a replica applies leaves its
+//! digest and every file's text are the authority's; every delta a replica applies leaves its
//! terminal what the authority's was at that version, and at quiescence it
//! is the authority's, cell for cell. Reported per RTT: how inputs went
//! (applied at once, stopped at a host call, left to the authority), how
@@ -457,6 +457,16 @@ fn run(r: Run, dir: []const u8, totals: *Totals) !void {
std.debug.print("seed {d} rtt {d} ms: replica {d}'s terminal {d} at quiescence is not the authority's\n", .{ r.seed, r.rtt_ms, id, pid });
}
}
+ // ...and every file's text the authority's, byte for byte: a digest
+ // takes a text of 4 KiB and up by its length (src/walk.zig).
+ for (a.core.panes, 0..) |slot, pid| {
+ const f = (slot orelse continue).file orelse continue;
+ const mine = if (rp.core().panes[pid]) |pane| pane.file else null;
+ if (mine == null or !std.mem.eql(u8, f.content, mine.?.content)) {
+ totals.unequal += 1;
+ std.debug.print("seed {d} rtt {d} ms: replica {d}'s text {d} at quiescence is not the authority's\n", .{ r.seed, r.rtt_ms, id, pid });
+ }
+ }
}
}