unionmount-testsuite: test rmdir of non-empty opaque dir
PATCH 1/1 unionmount-testsuite: test rmdir of non-empty opaque dir
--- tests/rmdir.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
tests/rmdir.py +16 -0
@@ -203,3 +203,19 @@ from errno import * 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)
Quoted 16 lines · Miklos Szeredi
--- tests/rmdir.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)tests/rmdir.py +6
-0@@ -203,3 +203,19 @@ from errno import * 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"
tests/rmdir.py from errno import * · line 221
Quoted 10 lines
tests/rmdir.py +10
-0+ + 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)
I'm not familiar with this testsuite. The empty_dir will be on the lower level, and all the rmdir, mkdir and create are happening on a mounted union fs? I don't see where that is clear.
Quoted 3 lines · Vincent Batts
I'm not familiar with this testsuite. The
empty_dirwill be on the lower level, and all the rmdir, mkdir and create are happening on a mounted union fs? I don't see where that is clear.
That's handled by the core of the test infrastructure:
http://git.infradead.org/users/dhowells/unionmount-testsuite.git
Look in the base of the git tree.
The infrastructure creates a load of files and other objects then sets up the requested union (unionmount, overlayfs or even no union at all) over them and then runs all the tests.
David
Quoted 10 lines · David Howells
Quoted 3 lines · Vincent Batts
I'm not familiar with this testsuite. The
empty_dirwill be on the lower level, and all the rmdir, mkdir and create are happening on a mounted union fs? I don't see where that is clear.That's handled by the core of the test infrastructure:
http://git.infradead.org/users/dhowells/unionmount-testsuite.git
Quoted 7 lines
Look in the base of the git tree.
The infrastructure creates a load of files and other objects then sets up the requested union (unionmount, overlayfs or even no union at all) over them and then runs all the tests.
David
RIght on. Thanks.
vb
Applied and pushed. I've also pushed your overlayfs->overlay patch.
David