From c24cc19f4354056893aadf5d2c0008826d5d4714 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Wed, 5 Apr 2017 22:52:54 -0700 Subject: 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. --- test/test_examples.py | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'test') 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 -- cgit v1.2.3