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

Tests fail under pytest 5.x and newer #510

Closed
Emily0616 opened this issue Apr 12, 2020 · 6 comments
Closed

Tests fail under pytest 5.x and newer #510

Emily0616 opened this issue Apr 12, 2020 · 6 comments
Labels

Comments

@Emily0616
Copy link

I just followed the instruction using meson and ninja, but when I use pytest there is always this problem.

uname -a
Linux ocna1 5.1.0+ #1 SMP Wed Oct 30 13:23:39 +08 2019 x86_64 x86_64 x86_64 GNU/Linux

sudo python3 -m pytest test/

============================================================== test session starts ==============================================================
platform linux -- Python 3.6.9, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/yuandj/softwares/fuse-3.9.1/build/test, inifile: pytest.ini
collected 43 items

test/test_ctests.py::test_write_cache[False] PASSED                                                                                       [  2%]
test/test_ctests.py::test_write_cache[True] PASSED                                                                                        [  4%]
test/test_ctests.py::test_notify1[True-notify_inval_inode] PASSED                                                                         [  6%]
test/test_ctests.py::test_notify1[True-invalidate_path] PASSED                                                                            [  9%]
test/test_ctests.py::test_notify1[True-notify_store_retrieve] PASSED                                                                      [ 11%]
test/test_ctests.py::test_notify1[False-notify_inval_inode] PASSED                                                                        [ 13%]
test/test_ctests.py::test_notify1[False-invalidate_path] PASSED                                                                           [ 16%]
test/test_ctests.py::test_notify1[False-notify_store_retrieve] PASSED                                                                     [ 18%]
test/test_ctests.py::test_notify_file_size[True] PASSED                                                                                   [ 20%]
test/test_ctests.py::test_notify_file_size[False] PASSED                                                                                  [ 23%]
test/test_examples.py::test_hello[hello-options0-invoke_directly] PASSED                                                                  [ 25%]
test/test_examples.py::test_hello[hello-options0-invoke_mount_fuse] PASSED                                                                [ 27%]
test/test_examples.py::test_hello[hello-options0-invoke_mount_fuse_drop_privileges] PASSED                                                [ 30%]
test/test_examples.py::test_hello[hello-options1-invoke_directly] PASSED                                                                  [ 32%]
test/test_examples.py::test_hello[hello-options1-invoke_mount_fuse] PASSED                                                                [ 34%]
test/test_examples.py::test_hello[hello-options1-invoke_mount_fuse_drop_privileges] PASSED                                                [ 37%]
test/test_examples.py::test_hello[hello_ll-options0-invoke_directly] PASSED                                                               [ 39%]
test/test_examples.py::test_hello[hello_ll-options0-invoke_mount_fuse] PASSED                                                             [ 41%]
test/test_examples.py::test_hello[hello_ll-options0-invoke_mount_fuse_drop_privileges] PASSED                                             [ 44%]
test/test_examples.py::test_hello[hello_ll-options1-invoke_directly] PASSED                                                               [ 46%]
test/test_examples.py::test_hello[hello_ll-options1-invoke_mount_fuse] PASSED                                                             [ 48%]
test/test_examples.py::test_hello[hello_ll-options1-invoke_mount_fuse_drop_privileges] PASSED                                             [ 51%]
test/test_examples.py::test_passthrough[False-passthrough-False] FAILED                                                                   [ 53%]

=================================================================== FAILURES ====================================================================
___________________________________________________ test_passthrough[False-passthrough-False] ___________________________________________________
Traceback (most recent call last):
  File "/home/yuandj/softwares/fuse-3.9.1/build/test/test_examples.py", line 167, in test_passthrough
    subprocess.check_call(syscall_test_cmd)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/yuandj/softwares/fuse-3.9.1/build/test/../test/test_syscalls', '/tmp/tmp6olyxvce/mnt/tmp/tmp6olyxvce/src', ':/tmp/tmp6olyxvce/src']' returned non-zero exit status 1.

/usr/local/lib/python3.6/dist-packages/_pytest/mark/structures.py:327
/usr/local/lib/python3.6/dist-packages/_pytest/mark/structures.py:327
  /usr/local/lib/python3.6/dist-packages/_pytest/mark/structures.py:327: PytestUnknownMarkWarning: Unknown pytest.mark.uses_fuse - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============================================================ short test summary info ============================================================
FAILED test/test_examples.py::test_passthrough[False-passthrough-False] - subprocess.CalledProcessError: Command '['/home/yuandj/softwares/fus...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================== 1 failed, 22 passed, 2 warnings in 19.77s ===================================================

Thanks in advance.

@Nikratio
Copy link
Contributor

Nikratio commented Aug 9, 2020

Perhaps this needs to be adjusted for Pytest 5.x? It works fine on 3.x. Pull requests welcome :-).

@Nikratio Nikratio changed the title test_passthrough[False-passthrough-False] fails Tests fail under pytest 5.x and newer Aug 9, 2020
@Nikratio Nikratio added the bug label Aug 9, 2020
@Rethan
Copy link
Contributor

Rethan commented Nov 4, 2020

platform linux -- Python 3.8.5, pytest-5.3.5, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
Under my ubuntu 20.04, tests are passed or skipped without any error. Is that really a pytest version problem?

@Nikratio
Copy link
Contributor

Nikratio commented Dec 7, 2020

Fixed in d7d0859.

@Nikratio Nikratio closed this as completed Dec 7, 2020
@LocutusOfBorg
Copy link

will this be backported to 1.3.6 version? I can't find a way to apply this patch, and this bug needs to be fixed for the upcoming Debian stable release
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979297

@Nikratio
Copy link
Contributor

From the above commit, you only need the one line change to pytest.ini.

@Nikratio
Copy link
Contributor

Note that you are looking at the wrong Git tree though. The Debian bug report is for python-llfuse, this is the libfuse issue tracker and Git tree. You are probably looking for python-llfuse/python-llfuse#35.

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

No branches or pull requests

4 participants