]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add shared subtrees to umount --recursive test
authorKarel Zak <kzak@redhat.com>
Thu, 15 Nov 2012 15:42:56 +0000 (16:42 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 15 Nov 2012 15:42:56 +0000 (16:42 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/mount/umount-recursive
tests/ts/mount/umount-recursive

index 86bccc81b32c01fbe9a9c5e82a8361f93b14951c..6a95d56dbf2b80b30c388d35c2eead4503e050f5 100644 (file)
@@ -7,6 +7,8 @@ Create filesystem D
 Do tests...
 A) Mount root
 B) Mount child
+B2) Mount child-bind
 C) Mount child/child
 D) Mount child/child
+E) Mount child-bind
 Success
index c01cc6a113a37ff79d0f71d3157be79584003070..53b0b39e0211d1b8085d80a8b7d61794d6398147 100755 (executable)
@@ -66,17 +66,26 @@ ts_log "Do tests..."
 
 ts_log "A) Mount root"
 $TS_CMD_MOUNT ${DEVICE}1 $TS_MOUNTPOINT >> $TS_OUTPUT 2>&1
+$TS_CMD_MOUNT --make-shared $TS_MOUNTPOINT
 
 ts_log "B) Mount child"
 mkdir -p $TS_MOUNTPOINT/mntB
 $TS_CMD_MOUNT ${DEVICE}2 $TS_MOUNTPOINT/mntB >> $TS_OUTPUT 2>&1
 
+ts_log "B2) Mount child-bind"
+mkdir -p $TS_MOUNTPOINT/bindB
+$TS_CMD_MOUNT --bind $TS_MOUNTPOINT/mntB $TS_MOUNTPOINT/bindB >> $TS_OUTPUT 2>&1
+
 ts_log "C) Mount child/child"
 mkdir -p $TS_MOUNTPOINT/mntB/mnt{C,D}
 $TS_CMD_MOUNT ${DEVICE}3 $TS_MOUNTPOINT/mntB/mntC >> $TS_OUTPUT 2>&1
 
 ts_log "D) Mount child/child"
-$TS_CMD_MOUNT ${DEVICE}3 $TS_MOUNTPOINT/mntB/mntD >> $TS_OUTPUT 2>&1
+$TS_CMD_MOUNT ${DEVICE}4 $TS_MOUNTPOINT/mntB/mntD >> $TS_OUTPUT 2>&1
+
+ts_log "E) Mount child-bind"
+mkdir -p $TS_MOUNTPOINT/bindC
+$TS_CMD_MOUNT --bind $TS_MOUNTPOINT/mntB/mntC $TS_MOUNTPOINT/bindC
 
 $TS_CMD_UMOUNT --recursive $TS_MOUNTPOINT >> $TS_OUTPUT 2>&1
 [ $? == 0 ] || ts_die "umount failed"