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

Occasional test failure #49

Closed
snoyberg opened this issue Aug 8, 2014 · 2 comments
Closed

Occasional test failure #49

snoyberg opened this issue Aug 8, 2014 · 2 comments

Comments

@snoyberg
Copy link
Contributor

snoyberg commented Aug 8, 2014

I'm seeing the following test failure in some circumstances. I think it's just a race condition in the tests, but I'm not certain.

Unpacking to fsnotify-0.1.0.2/
Resolving dependencies...
Configuring fsnotify-0.1.0.2...
Building fsnotify-0.1.0.2...
Preprocessing library fsnotify-0.1.0.2...
[1 of 7] Compiling System.FSNotify.Path ( src/System/FSNotify/Path.hs, dist/build/System/FSNotify/Path.o )
[2 of 7] Compiling System.FSNotify.Types ( src/System/FSNotify/Types.hs, dist/build/System/FSNotify/Types.o )
[3 of 7] Compiling System.FSNotify.Listener ( src/System/FSNotify/Listener.hs, dist/build/System/FSNotify/Listener.o )
[4 of 7] Compiling System.FSNotify.Linux ( src/System/FSNotify/Linux.hs, dist/build/System/FSNotify/Linux.o )
[5 of 7] Compiling System.FSNotify.Polling ( src/System/FSNotify/Polling.hs, dist/build/System/FSNotify/Polling.o )
[6 of 7] Compiling System.FSNotify  ( src/System/FSNotify.hs, dist/build/System/FSNotify.o )
[7 of 7] Compiling System.FSNotify.Devel ( src/System/FSNotify/Devel.hs, dist/build/System/FSNotify/Devel.o )
[1 of 7] Compiling System.FSNotify.Path ( src/System/FSNotify/Path.hs, dist/build/System/FSNotify/Path.p_o )
[2 of 7] Compiling System.FSNotify.Types ( src/System/FSNotify/Types.hs, dist/build/System/FSNotify/Types.p_o )
[3 of 7] Compiling System.FSNotify.Listener ( src/System/FSNotify/Listener.hs, dist/build/System/FSNotify/Listener.p_o )
[4 of 7] Compiling System.FSNotify.Linux ( src/System/FSNotify/Linux.hs, dist/build/System/FSNotify/Linux.p_o )
[5 of 7] Compiling System.FSNotify.Polling ( src/System/FSNotify/Polling.hs, dist/build/System/FSNotify/Polling.p_o )
[6 of 7] Compiling System.FSNotify  ( src/System/FSNotify.hs, dist/build/System/FSNotify.p_o )
[7 of 7] Compiling System.FSNotify.Devel ( src/System/FSNotify/Devel.hs, dist/build/System/FSNotify/Devel.p_o )
In-place registering fsnotify-0.1.0.2...
Preprocessing test suite 'test' for fsnotify-0.1.0.2...
[1 of 2] Compiling EventUtils       ( test/EventUtils.hs, dist/build/test/test-tmp/EventUtils.o )

test/EventUtils.hs:70:14: Warning:
    This binding for ‘poll’ shadows the existing binding
      imported from ‘Control.Concurrent.Async’ at test/EventUtils.hs:7:1-31

test/EventUtils.hs:74:33: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Num b0) arising from the literal ‘5’ at test/EventUtils.hs:74:33
      (Integral b0) arising from a use of ‘^’ at test/EventUtils.hs:74:32
    In the second argument of ‘(^)’, namely ‘5’
    In the second argument of ‘(*)’, namely ‘10 ^ 5’
    In the ‘confPollInterval’ field of a record

test/EventUtils.hs:88:14: Warning:
    This binding for ‘poll’ shadows the existing binding
      imported from ‘Control.Concurrent.Async’ at test/EventUtils.hs:7:1-31

test/EventUtils.hs:97:1: Warning:
    Top-level binding with no type signature:
      expectEventsHere :: (?timeInterval::Int) =>
                          Bool -> [EventPattern] -> IO () -> Assertion

test/EventUtils.hs:97:18: Warning:
    This binding for ‘poll’ shadows the existing binding
      imported from ‘Control.Concurrent.Async’ at test/EventUtils.hs:7:1-31

test/EventUtils.hs:98:1: Warning:
    Top-level binding with no type signature:
      expectEventsHereRec :: (?timeInterval::Int) =>
                             Bool -> [EventPattern] -> IO () -> Assertion

test/EventUtils.hs:98:21: Warning:
    This binding for ‘poll’ shadows the existing binding
      imported from ‘Control.Concurrent.Async’ at test/EventUtils.hs:7:1-31
[2 of 2] Compiling Main             ( test/test.hs, dist/build/test/test-tmp/Main.o )

test/test.hs:11:1: Warning:
    The import of ‘Text.Printf’ is redundant
      except perhaps to import instances from ‘Text.Printf’
    To import instances alone, use: import Text.Printf()

test/test.hs:24:1: Warning:
    Top-level binding with no type signature: main :: IO ()

test/test.hs:34:1: Warning:
    Top-level binding with no type signature: tests :: Bool -> TestTree

test/test.hs:41:21: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Num b0) arising from the literal ‘6’ at test/test.hs:41:21
      (Integral b0) arising from a use of ‘^’ at test/test.hs:41:20
    In the second argument of ‘(^)’, namely ‘6’
    In the second argument of ‘(*)’, namely ‘10 ^ 6’
    In the expression: 2 * 10 ^ 6

test/test.hs:42:21: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Num b0) arising from the literal ‘5’ at test/test.hs:42:21
      (Integral b0) arising from a use of ‘^’ at test/test.hs:42:20
    In the second argument of ‘(^)’, namely ‘5’
    In the second argument of ‘(*)’, namely ‘10 ^ 5’
    In the expression: 5 * 10 ^ 5

test/test.hs:54:44: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Num b0) arising from the literal ‘6’ at test/test.hs:54:44
      (Integral b0) arising from a use of ‘^’ at test/test.hs:54:43
    In the second argument of ‘(^)’, namely ‘6’
    In the second argument of ‘($)’, namely ‘10 ^ 6’
    In the second argument of ‘when’, namely ‘(threadDelay $ 10 ^ 6)’

test/test.hs:75:5: Warning:
    This binding for ‘filename’ shadows the existing binding
      imported from ‘Filesystem.Path.CurrentOS’ at test/test.hs:8:1-32
      (and originally defined in ‘Filesystem.Path’)
Linking dist/build/test/test ...
Building fsnotify-0.1.0.2...
Preprocessing library fsnotify-0.1.0.2...
In-place registering fsnotify-0.1.0.2...
Preprocessing test suite 'test' for fsnotify-0.1.0.2...
Running 1 test suites...
Test suite test: RUNNING...
Tests
  Native
    Non-recursive
      Right here
        new file:                FAIL
          Unexpected event.
            Expected :[Added FilePath "/home/ubuntu/haskell/stackage/runtests/fsnotify-0.1.0.2/testdir/test.6435/testfile",Modified FilePath "/home/ubuntu/haskell/stackage/runtests/fsnotify-0.1.0.2/testdir/test.6435/testfile"]
            Actual: [Modified (FilePath "/home/ubuntu/haskell/stackage/runtests/fsnotify-0.1.0.2/testdir/test.6435/testfile") 2014-08-07 17:45:59.012689 UTC,Added (FilePath "/home/ubuntu/haskell/stackage/runtests/fsnotify-0.1.0.2/testdir/test.6435/testfile") 2014-08-07 17:45:59.012681 UTC]
        modify file:             OK
        delete file:             OK
        directories are ignored: OK
      In a subdirectory
        new file:                OK
        modify file:             OK
        delete file:             OK
        directories are ignored: OK
    Recursive
      Right here
        new file:                FAIL
          Unexpected event.
            Expected :[Added FilePath "/home/ubuntu/haskell/stackage/runtests/fsnotify-0.1.0.2/testdir/test.6435/testfile",Modified FilePath "/home/ubuntu/haskell/stackage/runtests/fsnotify-0.1.0.2/testdir/test.6435/testfile"]
            Actual: [Modified (FilePath "/home/ubuntu/haskell/stackage/runtests/fsnotify-0.1.0.2/testdir/test.6435/testfile") 2014-08-07 17:46:03.164445 UTC,Added (FilePath "/home/ubuntu/haskell/stackage/runtests/fsnotify-0.1.0.2/testdir/test.6435/testfile") 2014-08-07 17:46:03.164444 UTC]
        modify file:             OK
        delete file:             OK
        directories are ignored: OK
      In a subdirectory
        new file:                OK
        modify file:             OK
        delete file:             OK
        directories are ignored: OK
  Polling
    Non-recursive
      Right here
        new file:                OK
        modify file:             OK
        delete file:             OK
        directories are ignored: OK
      In a subdirectory
        new file:                OK
        modify file:             OK
        delete file:             OK
        directories are ignored: OK
    Recursive
      Right here
        new file:                OK
        modify file:             OK
        delete file:             OK
        directories are ignored: OK
      In a subdirectory
        new file:                OK
        modify file:             OK
        delete file:             OK
        directories are ignored: OK

2 out of 32 tests failed
Test suite test: FAIL
Test suite logged to: dist/test/fsnotify-0.1.0.2-test.log
0 of 1 test suites (0 of 1 test cases) passed.
@UnkindPartition
Copy link
Member

@snoyberg thanks for the report. I released 0.1.0.3 to hackage with a fix. There's still a small chance for them to be in the wrong order when the timestamps are exactly the same (in one of those tests they are dangerously close). If this happens again, let us know.

@snoyberg
Copy link
Contributor Author

snoyberg commented Aug 8, 2014

Cool, thanks @feuerbach.

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