Skip to content

test(soak): model rename now that the filesystem supports it - #187

Merged
mattmattox merged 1 commit into
mainfrom
test/soak-rename
Nov 17, 2026
Merged

mattmattox merged 1 commit into
mainfrom
test/soak-rename

Conversation

@mattmattox

@mattmattox mattmattox commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The soak driver still expected every rename to fail, so on today's main the first successful rename failed the run. This models rename as main implements it. Renames are now 6 of the 101 op weights, up from 2 of 97.

  • What a rename does: it moves a lane's file, link or directory, with a directory's whole subtree and a file's snapshots. A rename over another of the lane's entries replaces it, and a replaced file's snapshots become orphans, as with unlink.
  • Errnos: ENOENT for a missing source or target parent, EISDIR for a file onto a directory, ENOTDIR for the reverse, ENOTEMPTY onto a directory with entries, EINVAL for a directory into itself, and 0 for a rename onto itself. These follow renameErrno and the kernel's checks.
  • Lanes: a lane's directories hold only its own entries, and directories move only directly under the shared directories, so no lane moves another lane's files.
  • Symlink checks: a link's path is now checked in its directory's listing. Reading follows the link, so a link in a lane directory to a lane file one level up would read as that file where the model wants ENOENT. That is found from the code, not seen in a run. The link's target is no longer compared as a path.

Tested on .66: a soak of main 7c31ff8 plus #185 and this branch ran 873 ops, 56 of them renames. Every result matched the model: 43 succeeded, 15 ENOENT, 3 EISDIR, 1 ENOTDIR, 1 EINVAL and 1 ENOTEMPTY. I stopped it to restart on main with #186. The 2h soak for #185 now uses this branch too. The new model test covers each rename rule.

🤖 Generated with Claude Code

Renames move a lane's files, links and directories, replace its other entries,
or fail with the errno rename(2) gives. The driver also checks a symlink in its
directory's listing instead of reading through it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmattox
mattmattox merged commit b5f69e3 into main Nov 17, 2026
18 checks passed
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