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_fuse.py::test_fuse[remote-False] FAILED #59

Open
yarikoptic opened this issue Feb 8, 2022 · 1 comment
Open

test_fuse.py::test_fuse[remote-False] FAILED #59

yarikoptic opened this issue Feb 8, 2022 · 1 comment

Comments

@yarikoptic
Copy link
Member

Troubleshooting #56 I am running a for s in {1..100}; do echo $s; date; python -m pytest -vv -k 'test_fuse' --libfuse datalad_fuse; done loop and one (first) run had a test fail:

datalad_fuse/tests/test_fuse.py::test_fuse[remote-False] FAILED 
...

tmp_path = PosixPath('/home/yoh/.tmp/pytest-of-yoh/pytest-100/test_fuse_remote_False_0'), transparent = False
url_dataset = (Dataset('/home/yoh/.tmp/pytest-of-yoh/pytest-100/url_dataset0/ds'), {'binary.png': b'\x89PNG\r\n\x1a\n\x00\x00\x00\rI...arta decima et\nquinta decima.  Eodem modo typi, qui nunc nobis videntur parum clari, fiant\nsollemnes in futurum.\n'})

    @pytest.mark.parametrize("transparent", [False, True])
    def test_fuse(tmp_path, transparent, url_dataset):
        ds, data_files = url_dataset
        if transparent:
            opts = ["--mode-transparent"]
            dots = [".datalad", ".git", ".gitattributes"]
        else:
            opts = []
            dots = [".datalad", ".gitattributes"]
        p = subprocess.Popen(
            ["datalad", "fusefs", "-d", ds.path, "--foreground", str(tmp_path), *opts]
        )
        # Check that the command didn't fail immediately:
        with pytest.raises(subprocess.TimeoutExpired):
            p.wait(timeout=3)
>       assert sorted(q.name for q in tmp_path.iterdir()) == dots + sorted(data_files)
E       AssertionError: assert [] == ['.datalad', '.gitattributes', 'binary.png', 'text.txt']
E         Right contains 4 more items, first extra item: '.datalad'
E         Full diff:
E         - ['.datalad', '.gitattributes', 'binary.png', 'text.txt']
E         + []

datalad_fuse/tests/test_fuse.py:25: AssertionError

may be just that timeout was not sufficient @jwodder ?

@yarikoptic
Copy link
Member Author

interesting observation: that run started Tue Feb 8 12:16:51 PM EST 2022 and the only one so far which had a failing test. Looking at ps now I see leftover datalad process

yoh       581610  0.0  0.1 346732 45392 pts/4    Sl   12:16   0:02  \_ /home/yoh/proj/datalad/datalad-fuse/venvs/dev3/bin/python3 /home/yoh/proj/datalad/datalad-fuse/venvs/dev3/bin/datalad fusefs -d /home/yoh/.tmp/pytest-of-yoh/pytest-100/url_dataset0/ds --foreground /home/yoh/.tmp/pytest-of-yoh/pytest-100/test_fuse_remote_False_0

so, I think that the "fix" for #58 should ensure in finally to close that fusefs process on failure.

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