Skip to content

Commit

Permalink
Merge pull request #703 from SGrondin/idempotent-test
Browse files Browse the repository at this point in the history
Make posix open_beneath test idempotent
  • Loading branch information
talex5 authored Feb 25, 2024
2 parents 57c0207 + ec57610 commit 261b583
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 261b583

Please sign in to comment.