generic: test mount move semantics
PATCH 1/1 generic: test mount move semantics
This's a functional test case for mount --move operation, it verifies below semantics:
---------------------------------------------------------------------------
| MOVE MOUNT OPERATION | |************************************************************************** |source(A)->| shared | private | slave | unbindable | | dest(B) | | | | | | | | | | | | | v | | | | | |************************************************************************** | shared | shared | shared | shared & slave | invalid | | | | | | | |non-shared| shared | private | slave | unbindable |
***************************************************************************
NOTE: moving a mount residing under a shared mount is invalid.
This case uses fsstress to produce a little random load, to make sure basic operations won't break the the moved mountpoints.
--- common/rc | 6 + tests/generic/461 | 192 ++++++++++++++++++++++++++ tests/generic/461.out | 374 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/group | 1 + 4 files changed, 573 insertions(+) create mode 100755 tests/generic/461 create mode 100644 tests/generic/461.out
common/rc +6 -0
@@ -200,6 +200,12 @@ _get_mount() _mount $* if [ $? -eq 0 ]; then + # mount --move operation updates the mountpoint, so remove + # the old one and insert the new one + if [[ "$*" =~ --move|-M ]]; then + MOUNTED_POINT_STACK=`echo $MOUNTED_POINT_STACK | \ + cut -d\ -f2-` + fi MOUNTED_POINT_STACK="$mnt_point $MOUNTED_POINT_STACK" else return 1
tests/generic/461 new file +192 -0
192 lines not on this page · raw message
tests/generic/461.out new file +374 -0
374 lines not on this page · raw message
tests/generic/group +1 -0
@@ -463,3 +463,4 @@ 458 auto quick clone 459 auto dangerous 460 auto quick rw +461 auto quick mount
Signature · 1 line
2.13.5
Quoted 14 lines · Zorro Lang
This's a functional test case for mount --move operation, it verifies below semantics:
---------------------------------------------------------------------------
| MOVE MOUNT OPERATION | |************************************************************************** |source(A)->| shared | private | slave | unbindable | | dest(B) | | | | | | | | | | | | | v | | | | | |************************************************************************** | shared | shared | shared | shared & slave | invalid | | | | | | | |non-shared| shared | private | slave | unbindable |
Quoted 7 lines
***************************************************************************
NOTE: moving a mount residing under a shared mount is invalid.This case uses fsstress to produce a little random load, to make sure basic operations won't break the the moved mountpoints.
Signed-off-by Zorro Lang <[email protected]>
Thanks for the test! As what we discussed just now, the --move semantics test is hard to follow, please add more comments inline to describe your test steps and purpose.
Thanks,
Eryu