Skip to content

shellfs property test: generated symlinks never lead out of the test root - #597

Merged
jaredLunde merged 1 commit into
mainfrom
jared/props-symlinks-inside-root
Oct 27, 2026
Merged

jaredLunde merged 1 commit into
mainfrom
jared/props-symlinks-inside-root

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

The flake

shellfs_props::small_response_cap failed in #596's CI listing /tmp/.tmpX/$(true), a generated symlink whose target was .. and so led out of the test root into /tmp. Since the N1 fix, list follows a symlink given as the directory, so ShellFs and the std::fs oracle both listed the live, shared /tmp, and the two reads differed while other tests created temp dirs. (The cause is in the generator, not the client: a test must not read a shared directory.)

Fix

env_symlink now creates a link only when its target, resolved lexically from the link's physical parent (absolute targets from /), stays inside the test root. /dev/null (a file) and dangling targets inside the root are still generated. This covers .. from a top-level link and root/.. picked as a target.

The differential generator on jared/sandbox-differential (#590) has its own copy of this rule in tests/differential/oracle.rs and needs the same change when it lands.

Property tests 12/12 and clippy -D warnings pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64

…root

Since list follows a symlink given as the directory, a generated link to .. (or to root/..) made ShellFs and the std::fs oracle list the live, shared /tmp at different moments.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
@jaredLunde
jaredLunde added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 63b65ce Oct 27, 2026
23 checks passed
@jaredLunde
jaredLunde deleted the jared/props-symlinks-inside-root branch October 27, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant