mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-09 00:00:04 +03:00
The purpose of these tests is to verify that bcachefs fuse support works as expected, including gathering valgrind errors from the bcachefs executable. To do this, bcachefs is executed from a helper thread in the new util.BFuse class, which goes about setting up and validating the valgrind data as well as making sure the mount has completed sufficiently before the test starts executing. This also includes some basic functionality smoke tests which cover file creation, timestamps, etc. Signed-off-by: Justin Husted <sigstop@gmail.com>
20 lines
358 B
Python
20 lines
358 B
Python
#!/usr/bin/python3
|
|
#
|
|
# pytest fixture definitions.
|
|
|
|
import pytest
|
|
import util
|
|
|
|
@pytest.fixture
|
|
def bfuse(tmpdir):
|
|
'''A test requesting a "bfuse" is given one via this fixture.'''
|
|
|
|
dev = util.format_1g(tmpdir)
|
|
mnt = util.mountpoint(tmpdir)
|
|
bf = util.BFuse(dev, mnt)
|
|
|
|
yield bf
|
|
|
|
if bf.returncode is None:
|
|
bf.unmount(timeout=5.0)
|