aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2017-04-05 22:52:54 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2017-04-07 16:40:15 -0700
commitc24cc19f4354056893aadf5d2c0008826d5d4714 (patch)
tree7d045931984a5ead32438ca354c1aab4dd659339 /test
parenta0b814a6ee3fdedad5c3a9d7329b85096ca61589 (diff)
passthrough_ll: only test functions that are actually provided
This appeared to work because of an unrelated bug that caused us to actually never access the mountpoint at all and do all tests on the lower filesystem. This issue will be fixed in a separate commit.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_examples.py42
1 files changed, 23 insertions, 19 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index 0eb4099..7b0b664 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -64,6 +64,7 @@ def test_hello(tmpdir, name, options):
'passthrough_ll'))
@pytest.mark.parametrize("debug", (True, False))
def test_passthrough(tmpdir, name, debug):
+ is_ll = (name == 'passthrough_ll')
mnt_dir = str(tmpdir.mkdir('mnt'))
src_dir = str(tmpdir.mkdir('src'))
@@ -77,26 +78,29 @@ def test_passthrough(tmpdir, name, debug):
wait_for_mount(mount_process, mnt_dir)
work_dir = pjoin(mnt_dir, src_dir)
- subprocess.check_call([ os.path.join(basename, 'test', 'test_syscalls'),
- work_dir, ':' + src_dir ])
-
- tst_readdir(src_dir, work_dir)
- tst_mkdir(work_dir)
- tst_rmdir(src_dir, work_dir)
- tst_open_write(src_dir, work_dir)
- tst_create(work_dir)
- tst_symlink(work_dir)
- tst_unlink(src_dir, work_dir)
- if os.getuid() == 0:
- tst_chown(work_dir)
- # Underlying fs may not have full nanosecond resolution
- tst_utimens(work_dir, ns_tol=1000)
- tst_link(work_dir)
tst_statvfs(work_dir)
- tst_truncate_path(work_dir)
- tst_truncate_fd(work_dir)
- tst_open_unlink(work_dir)
- tst_passthrough(src_dir, work_dir)
+ tst_readdir(src_dir, work_dir)
+ if not is_ll:
+ tst_mkdir(work_dir)
+ tst_rmdir(src_dir, work_dir)
+ tst_create(work_dir)
+ tst_open_write(src_dir, work_dir)
+ tst_unlink(src_dir, work_dir)
+ tst_symlink(work_dir)
+ if os.getuid() == 0:
+ tst_chown(work_dir)
+
+ # Underlying fs may not have full nanosecond resolution
+ tst_utimens(work_dir, ns_tol=1000)
+
+ tst_link(work_dir)
+ tst_truncate_path(work_dir)
+ tst_truncate_fd(work_dir)
+ tst_open_unlink(work_dir)
+ tst_passthrough(src_dir, work_dir)
+
+ subprocess.check_call([ os.path.join(basename, 'test', 'test_syscalls'),
+ work_dir, ':' + src_dir ])
except:
cleanup(mnt_dir)
raise