-
Notifications
You must be signed in to change notification settings - Fork 16
Add Sys.is_directory, Sys.remove and Sys.rename #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Rebased on |
I've spent some time on this PR today:
I've observed that the Linux parallel test may now sometimes fail within 200 attempts. Some of the error cases could still benefit from being rewritten with suitable function abstractions. |
Rebased yesterday to trigger these on the patched # Sys.mkdir "sandbox\\eee" 0o755;;
- : unit = ()
# Sys.rename "sandbox" "sandbox\\eee";;
Exception: Sys_error "Invalid argument".
# Sys.file_exists "sandbox\\eee";;
- : bool = false |
I did a fresh rebase of this PR.
The above is considered a clean-up, paving the way for further extensions. |
I pushed a clean-up commit d2a1345 which
CI summary
Out of these, 1 is a false alarm and 2 are CI infrastructure errors. |
Rebased on |
CI summary for f8dc3b9 - this is still running focused Sys STM tests:
It is clearly harder to trigger counterexamples under Linux. |
I've removed the attempt to test for sequential consistency, as we end up testing properties of the underlying file system, which may vary widely across Linux and Windows and between CI and locally. I'm keeping a parallel stress-test though, as we would like to ensure that no crashes, infinite loops, or assertion errors are triggered by parallel usage. In addition I've reworked the generator based on statistics (stats code removed again on this branch), as they revealed relatively few "happy path" tests, e.g., to Finally, I've
While playing and testing this on 5.4 workflows I saw a timeout after 3h on macOS Intel 5.4 in the middle of the 4th run:
I'm curious whether this will show up elsewhere, e.g., on 5.3 and 5.5 too... 🤔 |
Oh dear, I've gotten used to triggering CI runs on branches without PRs, and hence included the usual workaround in commit 6782a89, resulting in twice as many CI workflow runs as intended... 😬 |
CI summary for 6782a89
All failures were due to #557 Out of 85 workflows, 7 failed or timeout with what appears to be a genuine issue |
This PR adds
Sys.is_directory
,Sys.remove
andSys.rename
to the current model-based STM tests.While doing so, I realized I could remove some of the duplicated code by pulling out special cases of insert and remove functions, and modeling things with generic insert/remove abstractions instead.
While writing this I discovered
Sys.rename
is not documented to work on anything but filesSys.rename
differs in two ways:Sys.rename
existing dir to existing fileSys.rename
existing dir to existing dir ("permission denied")The these reasons the CI tests currently fail.
I've opened a PR and an issue on the compiler for the above.