ligurio / unreliablefs

A FUSE-based fault injection filesystem.
https://ligurio.github.io/unreliablefs/unreliablefs.1.html
MIT License
174 stars 9 forks source link

test_create is broken on FreeBSD #45

Closed ligurio closed 3 years ago

ligurio commented 3 years ago
def test_create(setup_unreliablefs):
        mnt_dir, src_dir = setup_unreliablefs
        name = name_generator()
        fullname = pjoin(mnt_dir, name)
        with pytest.raises(OSError) as exc_info:
            os.stat(fullname)
        assert exc_info.value.errno == errno.ENOENT
        assert name not in os.listdir(mnt_dir)
        fd = os.open(fullname, os.O_CREAT | os.O_RDWR)
        os.close(fd)
>       assert name in os.listdir(mnt_dir)
E       AssertionError: assert 'testfile_6' in []
E        +  where [] = <built-in function listdir>('/tmp/pytest-of-root/pytest-0/test_create0/mnt')
E        +    where <built-in function listdir> = os.listdir
tests/test_unreliablefs.py:130: AssertionError

https://cirrus-ci.com/task/5170998354903040?command=test#L47