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

test.sh fails #95

Open
toravir opened this issue Nov 1, 2021 · 0 comments
Open

test.sh fails #95

toravir opened this issue Nov 1, 2021 · 0 comments

Comments

@toravir
Copy link

toravir commented Nov 1, 2021

There are three failures - with 0.2.10 tag, same with 0.2.9:

spoke:PyInotify-0.2.9 $ ./test.sh 
test__cycle (tests.test_inotify.TestInotify) ... ok
test__get_event_names (tests.test_inotify.TestInotify) ... ok
test__international_naming_python2 (tests.test_inotify.TestInotify) ... SKIP: Not in Python 2
test__international_naming_python3 (tests.test_inotify.TestInotify) ... ok
test__automatic_new_watches_on_existing_paths (tests.test_inotify.TestInotifyTree) ... ok
test__automatic_new_watches_on_new_paths (tests.test_inotify.TestInotifyTree) ... FAIL
test__cycle (tests.test_inotify.TestInotifyTree) ... FAIL
test__renames (tests.test_inotify.TestInotifyTree) ... FAIL
test__cycle (tests.test_inotify.TestInotifyTrees) ... ok

======================================================================
FAIL: test__automatic_new_watches_on_new_paths (tests.test_inotify.TestInotifyTree)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/raviraju/tmp/PyInotify-0.2.9/tests/test_inotify.py", line 298, in test__automatic_new_watches_on_new_paths
    self.assertEqual(events, expected)
AssertionError: Lists differ: [(_IN[49 chars]16), ['IN_CREATE', 'IN_ISDIR'], '/tmp/tmpibzf29dx', 'folder1')] != [(_IN[49 chars]16), ['IN_ISDIR', 'IN_CREATE'], '/tmp/tmpibzf29dx', 'folder1')]

First differing element 0:
(_INO[47 chars]=16), ['IN_CREATE', 'IN_ISDIR'], '/tmp/tmpibzf29dx', 'folder1')
(_INO[47 chars]=16), ['IN_ISDIR', 'IN_CREATE'], '/tmp/tmpibzf29dx', 'folder1')

  [(_INOTIFY_EVENT(wd=1, mask=1073742080, cookie=0, len=16),
-   ['IN_CREATE', 'IN_ISDIR'],
+   ['IN_ISDIR', 'IN_CREATE'],
    '/tmp/tmpibzf29dx',
    'folder1')]
-------------------- >> begin captured logging << --------------------
inotify.adapters: DEBUG: Inotify handle is (3).
inotify.adapters: DEBUG: Adding initial watches on tree: [/tmp/tmpibzf29dx]
inotify.adapters: DEBUG: Adding watch: [/tmp/tmpibzf29dx]
inotify.adapters: DEBUG: Added watch (1): [/tmp/tmpibzf29dx]
inotify.adapters: DEBUG: A directory has been created. We're adding a watch on it (because we're being recursive): [/tmp/tmpibzf29dx/folder1]
inotify.adapters: DEBUG: Adding watch: [/tmp/tmpibzf29dx/folder1]
inotify.adapters: DEBUG: Added watch (2): [/tmp/tmpibzf29dx/folder1]
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test__cycle (tests.test_inotify.TestInotifyTree)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/raviraju/tmp/PyInotify-0.2.9/tests/test_inotify.py", line 213, in test__cycle
    self.assertEqual(events, expected)
AssertionError: Lists differ: [(_IN[325 chars]T(wd=3, mask=256, cookie=0, len=16), ['IN_CREA[1517 chars] '')] != [(_IN[325 chars]T(wd=2, mask=256, cookie=0, len=16), ['IN_CREA[1517 chars]bb')]

First differing element 3:
(_INOTIFY_EVENT(wd=3, mask=256, cookie=0, len=16), ['IN_CREA[41 chars]le2')
(_INOTIFY_EVENT(wd=2, mask=256, cookie=0, len=16), ['IN_CREA[41 chars]le2')

  [(_INOTIFY_EVENT(wd=1, mask=256, cookie=0, len=16),
    ['IN_CREATE'],
    '/tmp/tmp276nhxa4',
    'seen_new_file1'),
   (_INOTIFY_EVENT(wd=1, mask=32, cookie=0, len=16),
    ['IN_OPEN'],
    '/tmp/tmp276nhxa4',
    'seen_new_file1'),
   (_INOTIFY_EVENT(wd=1, mask=8, cookie=0, len=16),
    ['IN_CLOSE_WRITE'],
    '/tmp/tmp276nhxa4',
    'seen_new_file1'),
-  (_INOTIFY_EVENT(wd=3, mask=256, cookie=0, len=16),
?                     ^

+  (_INOTIFY_EVENT(wd=2, mask=256, cookie=0, len=16),
?                     ^

    ['IN_CREATE'],
    '/tmp/tmp276nhxa4/aa',
    'seen_new_file2'),
-  (_INOTIFY_EVENT(wd=3, mask=32, cookie=0, len=16),
?                     ^

+  (_INOTIFY_EVENT(wd=2, mask=32, cookie=0, len=16),
?                     ^

    ['IN_OPEN'],
    '/tmp/tmp276nhxa4/aa',
    'seen_new_file2'),
-  (_INOTIFY_EVENT(wd=3, mask=8, cookie=0, len=16),
?                     ^

+  (_INOTIFY_EVENT(wd=2, mask=8, cookie=0, len=16),
?                     ^

    ['IN_CLOSE_WRITE'],
    '/tmp/tmp276nhxa4/aa',
    'seen_new_file2'),
-  (_INOTIFY_EVENT(wd=2, mask=256, cookie=0, len=16),
?                     ^

+  (_INOTIFY_EVENT(wd=3, mask=256, cookie=0, len=16),
?                     ^

    ['IN_CREATE'],
    '/tmp/tmp276nhxa4/bb',
    'seen_new_file3'),
-  (_INOTIFY_EVENT(wd=2, mask=32, cookie=0, len=16),
?                     ^

+  (_INOTIFY_EVENT(wd=3, mask=32, cookie=0, len=16),
?                     ^

    ['IN_OPEN'],
    '/tmp/tmp276nhxa4/bb',
    'seen_new_file3'),
-  (_INOTIFY_EVENT(wd=2, mask=8, cookie=0, len=16),
?                     ^

+  (_INOTIFY_EVENT(wd=3, mask=8, cookie=0, len=16),
?                     ^

    ['IN_CLOSE_WRITE'],
    '/tmp/tmp276nhxa4/bb',
    'seen_new_file3'),
   (_INOTIFY_EVENT(wd=1, mask=512, cookie=0, len=16),
    ['IN_DELETE'],
    '/tmp/tmp276nhxa4',
    'seen_new_file1'),
-  (_INOTIFY_EVENT(wd=3, mask=512, cookie=0, len=16),
?                     ^

+  (_INOTIFY_EVENT(wd=2, mask=512, cookie=0, len=16),
?                     ^

    ['IN_DELETE'],
    '/tmp/tmp276nhxa4/aa',
    'seen_new_file2'),
-  (_INOTIFY_EVENT(wd=2, mask=512, cookie=0, len=16),
?                     ^

+  (_INOTIFY_EVENT(wd=3, mask=512, cookie=0, len=16),
?                     ^

    ['IN_DELETE'],
    '/tmp/tmp276nhxa4/bb',
    'seen_new_file3'),
+  (_INOTIFY_EVENT(wd=2, mask=1024, cookie=0, len=0),
+   ['IN_DELETE_SELF'],
+   '/tmp/tmp276nhxa4/aa',
+   ''),
+  (_INOTIFY_EVENT(wd=2, mask=32768, cookie=0, len=0),
+   ['IN_IGNORED'],
+   '/tmp/tmp276nhxa4/aa',
+   ''),
   (_INOTIFY_EVENT(wd=1, mask=1073742336, cookie=0, len=16),
-   ['IN_DELETE', 'IN_ISDIR'],
+   ['IN_ISDIR', 'IN_DELETE'],
    '/tmp/tmp276nhxa4',
    'aa'),
   (_INOTIFY_EVENT(wd=3, mask=1024, cookie=0, len=0),
    ['IN_DELETE_SELF'],
-   '/tmp/tmp276nhxa4/aa',
?                     ^^

+   '/tmp/tmp276nhxa4/bb',
?                     ^^

    ''),
   (_INOTIFY_EVENT(wd=3, mask=32768, cookie=0, len=0),
    ['IN_IGNORED'],
-   '/tmp/tmp276nhxa4/aa',
?                     ^^

+   '/tmp/tmp276nhxa4/bb',
?                     ^^

    ''),
   (_INOTIFY_EVENT(wd=1, mask=1073742336, cookie=0, len=16),
-   ['IN_DELETE', 'IN_ISDIR'],
+   ['IN_ISDIR', 'IN_DELETE'],
    '/tmp/tmp276nhxa4',
-   'bb'),
?        ^

+   'bb')]
?        ^

-  (_INOTIFY_EVENT(wd=2, mask=1024, cookie=0, len=0),
-   ['IN_DELETE_SELF'],
-   '/tmp/tmp276nhxa4/bb',
-   ''),
-  (_INOTIFY_EVENT(wd=2, mask=32768, cookie=0, len=0),
-   ['IN_IGNORED'],
-   '/tmp/tmp276nhxa4/bb',
-   '')]
-------------------- >> begin captured logging << --------------------
inotify.adapters: DEBUG: Inotify handle is (3).
inotify.adapters: DEBUG: Adding initial watches on tree: [/tmp/tmp276nhxa4]
inotify.adapters: DEBUG: Adding watch: [/tmp/tmp276nhxa4]
inotify.adapters: DEBUG: Added watch (1): [/tmp/tmp276nhxa4]
inotify.adapters: DEBUG: Adding watch: [/tmp/tmp276nhxa4/bb]
inotify.adapters: DEBUG: Added watch (2): [/tmp/tmp276nhxa4/bb]
inotify.adapters: DEBUG: Adding watch: [/tmp/tmp276nhxa4/aa]
inotify.adapters: DEBUG: Added watch (3): [/tmp/tmp276nhxa4/aa]
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test__renames (tests.test_inotify.TestInotifyTree)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/raviraju/tmp/PyInotify-0.2.9/tests/test_inotify.py", line 235, in test__renames
    self.assertEqual(events1, expected)
AssertionError: Lists differ: [(_IN[52 chars], ['IN_CREATE', 'IN_ISDIR'], '/tmp/tmpz4opxolh', 'old_folder')] != [(_IN[52 chars], ['IN_ISDIR', 'IN_CREATE'], '/tmp/tmpz4opxolh', 'old_folder')]

First differing element 0:
(_INO[50 chars]), ['IN_CREATE', 'IN_ISDIR'], '/tmp/tmpz4opxolh', 'old_folder')
(_INO[50 chars]), ['IN_ISDIR', 'IN_CREATE'], '/tmp/tmpz4opxolh', 'old_folder')

  [(_INOTIFY_EVENT(wd=1, mask=1073742080, cookie=0, len=16),
-   ['IN_CREATE', 'IN_ISDIR'],
+   ['IN_ISDIR', 'IN_CREATE'],
    '/tmp/tmpz4opxolh',
    'old_folder')]
-------------------- >> begin captured logging << --------------------
inotify.adapters: DEBUG: Inotify handle is (3).
inotify.adapters: DEBUG: Adding initial watches on tree: [/tmp/tmpz4opxolh]
inotify.adapters: DEBUG: Adding watch: [/tmp/tmpz4opxolh]
inotify.adapters: DEBUG: Added watch (1): [/tmp/tmpz4opxolh]
inotify.adapters: DEBUG: A directory has been created. We're adding a watch on it (because we're being recursive): [/tmp/tmpz4opxolh/old_folder]
inotify.adapters: DEBUG: Adding watch: [/tmp/tmpz4opxolh/old_folder]
inotify.adapters: DEBUG: Added watch (2): [/tmp/tmpz4opxolh/old_folder]
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 9 tests in 8.038s

FAILED (SKIP=1, failures=3)
spoke:PyInotify-0.2.9 $ 
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Nov 26, 2022
Add ptest provided from the source code, and run it using pytest.

Since the tarball provided with pypi does not include ptest, switch the
source to be its git repo.

ptest result:
           PASS FAIL SKIP
qemux86-64 5    3    1
qemuarm64  5    3    1

This issue exists since inotify adds unit test support, and it is
reported here: dsoprea/PyInotify#95

Signed-off-by: Zheng Qiu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Nov 28, 2022
Add ptest provided from the source code, and run it using pytest.

Since the tarball provided with pypi does not include ptest, switch the
source to be its git repo.

ptest result:
           PASS FAIL SKIP
qemux86-64 5    3    1
qemuarm64  5    3    1

This issue exists since inotify adds unit test support, and it is
reported here: dsoprea/PyInotify#95

Signed-off-by: Zheng Qiu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Nov 29, 2022
Add ptest provided from the source code, and run it using pytest.

Since the tarball provided with pypi does not include ptest, switch the
source to be its git repo.

ptest result:
           PASS FAIL SKIP
qemux86-64 5    3    1
qemuarm64  5    3    1

This issue exists since inotify adds unit test support, and it is
reported here: dsoprea/PyInotify#95

Signed-off-by: Zheng Qiu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Add ptest provided from the source code, and run it using pytest.

Since the tarball provided with pypi does not include ptest, switch the
source to be its git repo.

ptest result:
           PASS FAIL SKIP
qemux86-64 5    3    1
qemuarm64  5    3    1

This issue exists since inotify adds unit test support, and it is
reported here: dsoprea/PyInotify#95

Signed-off-by: Zheng Qiu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
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

1 participant