diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 22:51:17 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | 4f65855f372186406f4e48708ec3d5eb9aceb6d3 (patch) | |
| tree | 0498afe611660274f96fbbe6a69c9c041ec6513d /test | |
| parent | 244704dabbe279d03f1432f8474e985aeb25f2ad (diff) | |
| download | pardes-4f65855f372186406f4e48708ec3d5eb9aceb6d3.tar.gz pardes-4f65855f372186406f4e48708ec3d5eb9aceb6d3.zip | |
log stats 0, and pardes re-pins cloud9 whose 9ns opens such a file direct and nonseekable: fs.md's follow recipe with cat works through a mount
The log stated the length an open would freeze, a length a mount's
kernel could take as its end, and a splicing cat read it from the
kernel's offset. log now stats 0, as the other streams and generated
views do, and the re-pinned cloud9's 9ns opens any file stating 0
FOPEN_DIRECT_IO | FOPEN_NONSEEKABLE. A look at such a file (the mounted
index) reads a regular file that will not seek as a stream rather than
refusing it as a pipe. selfmount runs the recipe, exec 3<>log; echo
follow >&3; cat <&3, through the mount and hears a record made after it
started.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/selfmount.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/selfmount.py b/test/selfmount.py index 86c32fa8..dd59083c 100644 --- a/test/selfmount.py +++ b/test/selfmount.py @@ -176,6 +176,16 @@ def run(binary): held = run(f"for i in $(seq 40); do cat {mount}/pane/{first}/event > /dev/null & done; " f"sleep 1; timeout 10 cat {mount}/layout > /dev/null; st=$?; kill $(jobs -p); exit $st\n".encode()) check(held == '0', f'cat layout answers beside 40 held event reads ({held!r})') + # fs.md's follow recipe, as written, with plain cat, its output + # a pipe (where coreutils cat splices): it hears a record made + # after it started. + recipe = Path(f'/tmp/{name}.follow') + ran = run(f"exec 3<>{mount}/log; echo follow >&3; " + f"(sleep 1; echo 'Msg recipe-heard' > {mount}/exec) & " + f"timeout 5 cat <&3 | cat > {recipe}; exit 0\n".encode()) + followed = recipe.read_text() if recipe.exists() else '' + recipe.unlink(missing_ok=True) + check(ran == '0' and 'recipe-heard' in followed, f'the log follow recipe with cat hears a new record ({followed[-120:]!r})') client.write('/exec', b'Msg still here\n') text = ''.join(cell[0] for cell in client.screen()['cells']) check('still here' in text, 'the editor answers after all of that') |
