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

some tests fail on Mac OS X #5

Open
agarwal opened this issue Oct 19, 2015 · 9 comments
Open

some tests fail on Mac OS X #5

agarwal opened this issue Oct 19, 2015 · 9 comments

Comments

@agarwal
Copy link
Member

agarwal commented Oct 19, 2015

In dc22fa6, I ported the main library to async. The tests are now broken and also need to be ported.

@agarwal
Copy link
Member Author

agarwal commented Oct 20, 2015

Some progress in 90444c1, but not sure if this commit got everything right since tests are failing. Need to review.

@agarwal
Copy link
Member Author

agarwal commented Oct 20, 2015

@pveber I have 2 of 9 tests failing for me. Can you confirm if you're getting the same behavior.

@pveber
Copy link
Contributor

pveber commented Oct 27, 2015

Oddly, I don't. I tried to change the initialization of the RNG several times but I don't see any failing test. Some OSX-specific problem?

@agarwal
Copy link
Member Author

agarwal commented Oct 27, 2015

You're right. It's only on my Mac. Just tried Ubuntu and it works fine. Here are the errors:

$ _build/app/run-ounit-tests.native 
.....EE..
==============================================================================
Error: Phat test suite:7:Create dir paths.

File "/Volumes/Solvuu/phat/_build/oUnit-Phat test suite-Ashish.local#01.log", line 38, characters 1-1:
Error: Phat test suite:7:Create dir paths (in the log).

Raised at file "src/result.ml", line 111, characters 23-26
Called from file "src/oUnitRunner.ml", line 46, characters 13-26

(src/monitor.ml.Error_
  ((exn
     ("OUnitTest.OUnit_failure(\"Filesys.mkdir failed to create path (Cons Root\\n (Cons (Dir var)\\n  (Cons (Dir folders)\\n   (Cons (Dir qd)\\n    (Cons (Dir 480pwlg91dg1ggqth6zxl1hm0000gn)\\n     (Cons (Dir T)\\n      (Cons (Dir ounit-964cb9-Ashish.local#01.dir)\\n       (Cons (Dir foo5407) (Cons (Dir foo5408) (Item (Dir foo5409)))))))))))\")"))
    (backtrace
      ("Raised at file \"src/oUnitAssert.ml\", line 45, characters 8-27"
        "Called from file \"src/deferred1.ml\", line 14, characters 64-67"
        "Called from file \"src/job_queue.ml\", line 164, characters 6-47"
        ""))
    (monitor
      (((name block_on_async) (here ()) (id 15) (has_seen_error true)
         (is_detached true) (kill_index 0))))))
------------------------------------------------------------------------------
==============================================================================
Error: Phat test suite:6:Exists test.

File "/Volumes/Solvuu/phat/_build/oUnit-Phat test suite-Ashish.local#01.log", line 15, characters 1-1:
Error: Phat test suite:6:Exists test (in the log).

Raised at file "src/result.ml", line 111, characters 23-26
Called from file "src/oUnitRunner.ml", line 46, characters 13-26

(src/monitor.ml.Error_
  ((exn
     ("OUnitTest.OUnit_failure(\"Failed to detect path (Item (Dir foo))\")"))
    (backtrace
      ("Raised at file \"src/oUnitAssert.ml\", line 45, characters 8-27"
        "Called from file \"src/deferred1.ml\", line 14, characters 64-67"
        "Called from file \"src/job_queue.ml\", line 164, characters 6-47"
        ""))
    (monitor
      (((name block_on_async) (here ()) (id 2) (has_seen_error true)
         (is_detached true) (kill_index 0))))))
------------------------------------------------------------------------------
Ran: 9 tests in: 0.12 seconds.
FAILED: Cases: 9 Tried: 9 Errors: 2 Failures: 0 Skip:  0 Todo: 0 Timeouts: 0.

@agarwal
Copy link
Member Author

agarwal commented Oct 27, 2015

For the first error, I have this:

$ ll -d /var/folders/qd/480pwlg91dg1ggqth6zxl1hm0000gn/T/
drwx------  214 ashish  staff   7.1K Oct 27 13:16 /var/folders/qd/480pwlg91dg1ggqth6zxl1hm0000gn/T/

but the next directory ounit-964cb9-Ashish.local#01.dir doesn't exist, so is that the point at which it failed? I'm not sure why it would. It works manually:

$ mkdir /var/folders/qd/480pwlg91dg1ggqth6zxl1hm0000gn/T/ounit-964cb9-Ashish.local#01.dir
(* no error, directory gets created *)

@pveber
Copy link
Contributor

pveber commented Oct 27, 2015

Maybe you could try to create it manually in utop and see what happens?

As for the second test, could you ls the contents of the temp directory
after create_test_directory is called?

2015-10-27 18:19 GMT+01:00 Ashish Agarwal [email protected]:

For the first error, I have this:

$ ll -d /var/folders/qd/480pwlg91dg1ggqth6zxl1hm0000gn/T/
drwx------ 214 ashish staff 7.1K Oct 27 13:16 /var/folders/qd/480pwlg91dg1ggqth6zxl1hm0000gn/T/

but the next directory ounit-964cb9-Ashish.local#01.dir doesn't exist, so
is that the point at which it failed? I'm not sure why it would. It works
manually:

$ mkdir /var/folders/qd/480pwlg91dg1ggqth6zxl1hm0000gn/T/ounit-964cb9-Ashish.local#01.dir
(* no error, directory gets created *)


Reply to this email directly or view it on GitHub
#5 (comment).

@pveber
Copy link
Contributor

pveber commented Oct 28, 2015

I just noticed that there was two important commits I had left behind (mistakenly left on the branch for the fold function since they only deal with exists and mkdir). Although the changes are not likely to clear this issue, but could you have a quick try, just to be sure?

@agarwal
Copy link
Member Author

agarwal commented Oct 28, 2015

Now I get 3 errors. :) Maybe one is a new test you added, not sure. For our record, here's the output:

$ _build/app/run-ounit-tests.native 
.......EEE
==============================================================================
Error: Phat test suite:8:Create dir paths.

File "/Volumes/Solvuu/phat/_build/oUnit-Phat test suite-Ashish.fios-router.home#01.log", line 15, characters 1-1:
Error: Phat test suite:8:Create dir paths (in the log).

Raised at file "src/result.ml", line 111, characters 23-26
Called from file "src/oUnitRunner.ml", line 46, characters 13-26

(src/monitor.ml.Error_
  ((exn
     ("OUnitTest.OUnit_failure(\"Filesys.mkdir failed to create path (Cons Root\\n (Cons (Dir var)\\n  (Cons (Dir folders)\\n   (Cons (Dir qd)\\n    (Cons (Dir 480pwlg91dg1ggqth6zxl1hm0000gn)\\n     (Cons (Dir T)\\n      (Cons (Dir ounit-354a9b-Ashish.fios-router.home#01.dir)\\n       (Cons (Dir foo3748)\\n        (Cons (Dir foo3749)\\n         (Cons (Dir foo3750)\\n          (Cons (Dir foo3751)\\n           (Cons\\n            (Link foo3761\\n             (Cons\\n              (Link foo3758\\n               (Cons (Dir foo3752)\\n                (Cons\\n                 (Link foo3756\\n                  (Item\\n                   (Link foo3755 (Cons (Dir foo3753) (Item (Dir foo3754))))))\\n                 (Item (Dir foo3757)))))\\n              (Item (Link foo3760 (Item (Dir foo3759))))))\\n            (Item (Link foo3763 (Item (Dir foo3762))))))))))))))))\")"))
    (backtrace
      ("Raised at file \"src/oUnitAssert.ml\", line 45, characters 8-27"
        "Called from file \"src/deferred1.ml\", line 14, characters 64-67"
        "Called from file \"src/job_queue.ml\", line 164, characters 6-47"
        ""))
    (monitor
      (((name block_on_async) (here ()) (id 2) (has_seen_error true)
         (is_detached true) (kill_index 0))))))
------------------------------------------------------------------------------
==============================================================================
Error: Phat test suite:9:Create dirs with cycles.

File "/Volumes/Solvuu/phat/_build/oUnit-Phat test suite-Ashish.fios-router.home#02.log", line 35, characters 1-1:
Error: Phat test suite:9:Create dirs with cycles (in the log).

Raised at file "src/result.ml", line 111, characters 23-26
Called from file "src/oUnitRunner.ml", line 46, characters 13-26

(src/monitor.ml.Error_
  ((exn
     ("OUnitTest.OUnit_failure(\"Filesys.mkdir failed to create the cyclic path correctly.\")"))
    (backtrace
      ("Raised at file \"src/oUnitAssert.ml\", line 45, characters 8-27"
        "Called from file \"src/deferred1.ml\", line 14, characters 64-67"
        "Called from file \"src/job_queue.ml\", line 164, characters 6-47"
        ""))
    (monitor
      (((name block_on_async) (here ()) (id 15) (has_seen_error true)
         (is_detached true) (kill_index 0))))))
------------------------------------------------------------------------------
==============================================================================
Error: Phat test suite:7:Exists test.

File "/Volumes/Solvuu/phat/_build/oUnit-Phat test suite-Ashish.fios-router.home#02.log", line 12, characters 1-1:
Error: Phat test suite:7:Exists test (in the log).

Raised at file "src/result.ml", line 111, characters 23-26
Called from file "src/oUnitRunner.ml", line 46, characters 13-26

(src/monitor.ml.Error_
  ((exn
     ("OUnitTest.OUnit_failure(\"Failed to detect path (Item (Dir foo))\")"))
    (backtrace
      ("Raised at file \"src/oUnitAssert.ml\", line 45, characters 8-27"
        "Called from file \"src/deferred1.ml\", line 14, characters 64-67"
        "Called from file \"src/job_queue.ml\", line 164, characters 6-47"
        ""))
    (monitor
      (((name block_on_async) (here ()) (id 2) (has_seen_error true)
         (is_detached true) (kill_index 0))))))
------------------------------------------------------------------------------
Ran: 10 tests in: 0.12 seconds.
FAILED: Cases: 10 Tried: 10 Errors: 3 Failures: 0 Skip:  0 Todo: 0 Timeouts: 0.

@agarwal agarwal changed the title port tests to async some tests fail on Mac OS X Nov 25, 2015
@agarwal
Copy link
Member Author

agarwal commented Nov 25, 2015

Changed title of this issue. The porting has been done. Remaining issue is to fix tests that fail on OS X.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants