-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add Sys.is_directory, Sys.remove and Sys.rename #304
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. |
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.