Skip to content
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

Make posix open_beneath test idempotent #703

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib_eio_posix/test/open_beneath.ml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let test base path =
check ~mode:0 base (path ^ "/") L.Open_flags.rdonly;
check ~mode:0 base (path ^ "/.") L.Open_flags.rdonly
)

let test_denied base path =
match L.Open_flags.resolve_beneath with
| Some some_resolve_beneath ->
Expand All @@ -57,7 +57,8 @@ let test_denied base path =

let () =
try
Eio_posix.run @@ fun _env ->
Eio_posix.run @@ fun env ->
Eio.Path.(rmtree ~missing_ok:true (Eio.Stdenv.cwd env / "test_beneath"));
Unix.mkdir "test_beneath" 0o700;
Unix.mkdir "test_beneath/subdir" 0o700;
Unix.symlink "subdir" "test_beneath/link_subdir";
Expand Down
Loading