aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2015-06-03 11:28:15 +0100
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2015-06-03 11:28:15 +0100
commit0d249b1989d0649eaca76fdfd52f000ddd00b0c5 (patch)
tree2cde64d6d49549d37a904c2048b23b92cf13a56b
parent3b048d5bf0046ffbc5af9740e3d77beb9f393ef4 (diff)
parent88150f27146e8209c831439745b7b0669df4f66f (diff)
Merge branch 'master' of git://git.infradead.org/users/dhowells/unionmount-testsuite
Conflicts: Makefile README mount_union.py
-rw-r--r--README19
-rw-r--r--mount_union.py2
-rw-r--r--tests/rmdir.py16
3 files changed, 33 insertions, 4 deletions
diff --git a/README b/README
index 98c2a58..37f6f2e 100644
--- a/README
+++ b/README
@@ -3,6 +3,19 @@ To run these tests:
(1) Make sure you have root permissions
(2) Run
- ./run --ov
- ./run --no
- ./run --um (might not work because of the incorrect path)
+ If testing unionmount, do:
+
+ ./run --um
+
+ If testing overlayfs, do:
+
+ ./run --ov
+
+ To run the tests without any unioning, do:
+
+ ./run --no
+
+ To just set up the environment and exit without doing any tests,
+ add the --set-up flag, eg:
+
+ ./run --ov --set-up
diff --git a/mount_union.py b/mount_union.py
index e5db16b..17edd3c 100644
--- a/mount_union.py
+++ b/mount_union.py
@@ -30,6 +30,6 @@ def mount_union(ctx):
workdir = upper_mntroot + "/work"
os.mkdir(upperdir)
os.mkdir(workdir)
- system("mount -t overlay overlayfs " + union_mntroot +
+ system("mount -t overlay overlay " + union_mntroot +
" -olowerdir=" + lower_mntroot + ",upperdir=" + upperdir + ",workdir=" + workdir)
ctx.note_upper_fs(upper_mntroot, testdir)
diff --git a/tests/rmdir.py b/tests/rmdir.py
index 3324d0b..9de7f72 100644
--- a/tests/rmdir.py
+++ b/tests/rmdir.py
@@ -203,3 +203,19 @@ def subtest_15(ctx):
ctx.rmdir(sym, err=ENOTDIR)
ctx.rmdir(sym, err=ENOTDIR)
ctx.rmdir(d, err=ENOENT)
+
+# Remove an empty lower directory, recreate, populate and try to remove
+def subtest_16(ctx):
+ """Remove non-empty opaque directory"""
+ d = ctx.empty_dir() + ctx.termslash()
+ f = d + "/b"
+
+ ctx.rmdir(d)
+ ctx.rmdir(d, err=ENOENT)
+ ctx.mkdir(d, 0o755)
+ ctx.open_file(f, wo=1, crt=1, ex=1, write="abcq")
+ ctx.rmdir(d, err=ENOTEMPTY)
+ ctx.unlink(f)
+ ctx.open_file(f, ro=1, err=ENOENT)
+ ctx.unlink(f, err=ENOENT)
+ ctx.rmdir(d)