Skip to content

fsevents expect tests fail on macos #8910

@gridbugs

Description

@gridbugs

Expected Behavior

The fsevents expect tests defined in test/expect-tests/fsevents/ should all pass. Running dune test test/expect-tests/fsevents should produce no output.

Actual Behavior

The output of dune test test/expect-tests/fsevents is:

File "test/expect-tests/fsevents/fsevents_tests.ml", line 1, characters 0-0:
diff --git a/_build/default/test/expect-tests/fsevents/fsevents_tests.ml b/_build/.sandbox/fdbd0c5af99815b26eb99e93065ce1e3/default/test/expect-tests/fsevents/fsevents_tests.ml.corrected
index bda3e030c..4520aef04 100644
--- a/_build/default/test/expect-tests/fsevents/fsevents_tests.ml
+++ b/_build/.sandbox/fdbd0c5af99815b26eb99e93065ce1e3/default/test/expect-tests/fsevents/fsevents_tests.ml.corrected
@@ -232,7 +232,7 @@ let%expect_test "file create event" =
   test_with_operations (fun () -> Io.String_path.write_file "./file" "foobar");
   [%expect
     {|
-    > { action = "Unknown"; kind = "File"; path = "$TESTCASE_ROOT/file" } |}]
+    > { action = "Create"; kind = "File"; path = "$TESTCASE_ROOT/file" } |}]
 ;;

 let%expect_test "dir create event" =
@@ -248,8 +248,8 @@ let%expect_test "move file" =
     Unix.rename "old" "new");
   [%expect
     {|
-    > { action = "Unknown"; kind = "File"; path = "$TESTCASE_ROOT/old" }
-    > { action = "Unknown"; kind = "File"; path = "$TESTCASE_ROOT/new" } |}]
+    > { action = "Create"; kind = "File"; path = "$TESTCASE_ROOT/old" }
+    > { action = "Rename"; kind = "File"; path = "$TESTCASE_ROOT/new" } |}]
 ;;

 let%expect_test "raise inside callback" =
@@ -278,14 +278,13 @@ let%expect_test "set exclusion paths" =
   run Filename.concat;
   [%expect
     {|
-    > { action = "Create"; kind = "Dir"; path = "$TESTCASE_ROOT/ignored" }
-    > { action = "Unknown"; kind = "File"; path = "$TESTCASE_ROOT/ignored/old" } |}];
+    > { action = "Create"; kind = "Dir"; path = "$TESTCASE_ROOT/ignored" } |}];
   (* but relative paths do not *)
   run (fun _ name -> name);
   [%expect
     {|
     > { action = "Create"; kind = "Dir"; path = "$TESTCASE_ROOT/ignored" }
-    > { action = "Unknown"; kind = "File"; path = "$TESTCASE_ROOT/ignored/old" } |}]
+    > { action = "Create"; kind = "File"; path = "$TESTCASE_ROOT/ignored/old" } |}]
 ;;

 let%expect_test "multiple fsevents" =

To Reproduce

On macos run dune test test/expect-tests/fsevents. I've reproduced this on an M1 mac running Ventura, and an intel mac running Montery.

Metadata

Metadata

Assignees

No one assigned

    Labels

    macosIssues that relate to Dune on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions