diff options
author | Justin Husted <sigstop@gmail.com> | 2019-11-09 19:00:56 -0800 |
---|---|---|
committer | Justin Husted <sigstop@gmail.com> | 2019-11-09 19:00:56 -0800 |
commit | c3f09963af8f2268aa0448a5d9ec1d99135121a2 (patch) | |
tree | 3e26554ddb29fe48aef1f341f2f1ab873a9c234c /tests/test_basic.py | |
parent | 7bf4aa61a77b9ff6d0c066d370b03e67a2eaade4 (diff) |
Implement basic fuse mount tests.
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>
Diffstat (limited to 'tests/test_basic.py')
-rw-r--r-- | tests/test_basic.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/test_basic.py b/tests/test_basic.py index 9cd7b2f8..f219f07e 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -21,8 +21,7 @@ def test_format(tmpdir): assert len(ret.stderr) == 0 def test_fsck(tmpdir): - dev = util.device_1g(tmpdir) - util.run_bch('format', dev, valgrind=False, check=True) + dev = util.format_1g(tmpdir) ret = util.run_bch('fsck', dev, valgrind=True) @@ -31,8 +30,7 @@ def test_fsck(tmpdir): assert len(ret.stderr) == 0 def test_list(tmpdir): - dev = util.device_1g(tmpdir) - util.run_bch('format', dev, valgrind=False, check=True) + dev = util.format_1g(tmpdir) ret = util.run_bch('list', dev, valgrind=True) @@ -42,8 +40,7 @@ def test_list(tmpdir): assert len(ret.stdout.splitlines()) == 2 def test_list_inodes(tmpdir): - dev = util.device_1g(tmpdir) - util.run_bch('format', dev, valgrind=False, check=True) + dev = util.format_1g(tmpdir) ret = util.run_bch('list', '-b', 'inodes', dev, valgrind=True) @@ -52,8 +49,7 @@ def test_list_inodes(tmpdir): assert len(ret.stdout.splitlines()) == (2 + 2) # 2 inodes on clean format def test_list_dirent(tmpdir): - dev = util.device_1g(tmpdir) - util.run_bch('format', dev, valgrind=False, check=True) + dev = util.format_1g(tmpdir) ret = util.run_bch('list', '-b', 'dirents', dev, valgrind=True) |