diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 22:59:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 23:22:39 -0300 |
| commit | 5618465914b259bea8f5d07e2438814e8607175d (patch) | |
| tree | f9ab27a29b5a42c3d2fd406d65878595ca3b5097 /test | |
| parent | dc4dd3bc25b11721ab3ad3fccbaea1de54b9fb90 (diff) | |
| download | pardes-5618465914b259bea8f5d07e2438814e8607175d.tar.gz pardes-5618465914b259bea8f5d07e2438814e8607175d.zip | |
cloud9 re-pinned at e66b2cf, whose 9ns opens files with FOPEN_PARALLEL_DIRECT_WRITES: an Edit filter writing, through a mount, the ctl its Edit came by (without truncating it) answers at once, not after 10 s; selfmount checks it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/selfmount.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/selfmount.py b/test/selfmount.py index 347093e1..c6565b5e 100644 --- a/test/selfmount.py +++ b/test/selfmount.py @@ -256,6 +256,17 @@ def run(binary): time.sleep(.05) check(got == '0' and all(f' held-{i}\n' in log for i in range(1, 41)), f'40 closes holding a last line each through the mount, all answered, every line run ({got!r})') + # An Edit whose filter writes the very ctl the Edit came by: 9ns + # opens with FOPEN_PARALLEL_DIRECT_WRITES, so the filter's write + # is not queued behind the one waiting for it. (Its own open may + # not truncate, `1<>`, not `>`: Linux takes the file's lock + # outright for an O_TRUNC open, and the waiting write holds it + # shared; nothing a server answers can change that.) + started = time.monotonic() + got = run(f"printf 'Edit ,>echo Msg filter-hi 1<> {mount}/pane/{scratch}/ctl\\n' > {mount}/pane/{scratch}/ctl\n".encode()) + took = time.monotonic() - started + check(got == '0' and took < 5 and 'filter-hi' in client.read('/log').decode(), + f'an Edit filter writing its own ctl through the mount answers promptly ({got!r}, {took:.1f}s)') # Forty event reads held through the mount, a follower each, and # the mount still answers the rest: 9ns keeps workers past what # the editor holds (128), so `cat layout` is not queued behind |
