diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-19 20:55:36 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-19 23:43:13 -0300 |
| commit | 261a652706c11615932b090f6572aa1732bff737 (patch) | |
| tree | d863d4d6f280309a5ca25f2c7826452cb6ccf7b9 /test | |
| parent | fe650384496d7ff8234fc10e62ea46c18c599b46 (diff) | |
| download | pardes-261a652706c11615932b090f6572aa1732bff737.tar.gz pardes-261a652706c11615932b090f6572aa1732bff737.zip | |
test: the frame corpus's click is one write, so a loaded machine no longer keeps a 78th frame: `d.mouse("down")` and `d.mouse("up")` were two writes to the window's pty, and its test feed (dev/gui/gui.zig StdinFeed.pump) dispatches what one read gives, so a loaded window could read the press alone, draw its frame, and read the release a pass later: one more frame in the click scene, which keeps every frame, and every kept frame after it shifted (the coordinator's failure: 78 frames, 56 differ from frame 16, the click's first; made at will with 200 ms between the two writes: 78, 56 differ, the click scene 14 frames against 13; plain loaded runs 0 of 6 at load 12-44); the press and release now go in one write, one read, one pass, one step; nothing reads real time (the virtual clock was never the cause), and the window draws no extra frame a user's would not (a real click's two events are always apart); after: frames 77/77 in the quiet gate (gpu/robust-q, load ~25) and in 4 loaded runs at load 17-44, and 3 more runs after the change at load 29-41 with 16 busy loops of mine at nice 15, 77/77 each (the loaded gate itself reached no frame count: the window answered the snake's `Addon load` past the 9P client's 2 s reply deadline at load 46-50, runtime/9p_io.zig:1174, a deadline of the runtime's, said in the report)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test')
| -rw-r--r-- | test/process/window.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/process/window.zig b/test/process/window.zig index 687b9000..00450a9b 100644 --- a/test/process/window.zig +++ b/test/process/window.zig @@ -426,8 +426,11 @@ fn corpus(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try d.mouse("wheel", -3, cell_w * 40, cell_h * 12); try k.keep(&d, from, "11 a wheel's glide, every frame", true); from = try k.mark(&d); - try d.mouse("down", 1, cell_w * 20, cell_h * 10); - try d.mouse("up", 1, cell_w * 20, cell_h * 10); + // The press and its release in one write (Detached.mouse's events), + // so the window reads them in one pass: written apart, a loaded + // machine let it read the press alone and draw a frame between, one + // more kept frame than the base's (78) and every one after shifted. + try d.typeKeys(f.at("\x1b]777;mouse;down;1;{d};{d}\x07\x1b]777;mouse;up;1;{d};{d}\x07", .{ cell_w * 20, cell_h * 10, cell_w * 20, cell_h * 10 })); try k.keep(&d, from, "11 a click moves the caret, every frame", true); from = try k.mark(&d); try d.typeKeys("gg"); |
