aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2017-04-05 22:17:59 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2017-04-07 16:40:15 -0700
commit3b04359dfb81776aafd594b911d4d7980bc202e0 (patch)
treefdfe565282c7531c5d74b15d215c8dcb449234ad /test
parentabae573495f624b38dd417a151b098b025b5f114 (diff)
tst_readdir(): don't require create/mkdir support
By creating the files in the lower filesystem, we can test readdir() even for filesystems that don't implement create() or mkdir().
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_examples.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index 92a67c0..4147479 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -81,6 +81,7 @@ def test_passthrough(tmpdir, name, debug):
work_dir, ':' + src_dir ])
tst_write(work_dir)
+ tst_readdir(src_dir, work_dir)
tst_mkdir(work_dir)
tst_symlink(work_dir)
tst_mknod(work_dir)
@@ -89,7 +90,6 @@ def test_passthrough(tmpdir, name, debug):
# Underlying fs may not have full nanosecond resolution
tst_utimens(work_dir, ns_tol=1000)
tst_link(work_dir)
- tst_readdir(work_dir)
tst_statvfs(work_dir)
tst_truncate_path(work_dir)
tst_truncate_fd(work_dir)
@@ -385,8 +385,8 @@ def tst_link(mnt_dir):
assert fstat1.st_nlink == 1
os.unlink(name1)
-def tst_readdir(mnt_dir):
- dir_ = pjoin(mnt_dir, name_generator())
+def tst_readdir(src_dir, mnt_dir):
+ dir_ = pjoin(src_dir, name_generator())
file_ = dir_ + "/" + name_generator()
subdir = dir_ + "/" + name_generator()
subfile = subdir + "/" + name_generator()