diff options
author | Karel Zak | 2011-01-02 22:56:31 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-03 12:28:48 +0100 |
commit | 1f42e1089aadbe537bb59143502ebd1767d3f7ea (patch) | |
tree | 2b47aa1920436836689fd99f7c1af72a88db088c /tests/ts | |
parent | mount: improve verbose info (diff) | |
download | kernel-qcow2-util-linux-1f42e1089aadbe537bb59143502ebd1767d3f7ea.tar.gz kernel-qcow2-util-linux-1f42e1089aadbe537bb59143502ebd1767d3f7ea.tar.xz kernel-qcow2-util-linux-1f42e1089aadbe537bb59143502ebd1767d3f7ea.zip |
tests: use findmnt(8) for mount --move test
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts')
-rwxr-xr-x | tests/ts/mount/move | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/ts/mount/move b/tests/ts/mount/move index bc4941d07..dfdd79a34 100755 --- a/tests/ts/mount/move +++ b/tests/ts/mount/move @@ -34,21 +34,18 @@ DIR_B="$TS_OUTDIR/mnt-move-B" $TS_CMD_MOUNT --bind $DIR_SRC $DIR_A # check the bind -egrep -q "^$DIR_SRC $DIR_A" /etc/mtab -[ "$?" == "0" ] || ts_die "Cannot found binded $DIR_SRC in /etc/mtab" +$TS_CMD_FINDMNT --kernel --target "$DIR_A" &> /dev/null +[ "$?" == "0" ] || ts_die "Cannot found binded $DIR_A in /proc/self/mountinfo" # move $TS_CMD_MOUNT --move $DIR_A $DIR_B # check the move -egrep -q "^$DIR_SRC $DIR_B" /etc/mtab -if [ "$?" != "0" ]; then - $TS_CMD_UMOUNT $DIR_SRC - ts_die "Cannot found moved $DIR_SRC in /etc/mtab" -fi +$TS_CMD_FINDMNT --kernel --target "$DIR_B" &> /dev/null +[ "$?" == "0" ] || ts_die "Cannot found binded $DIR_B in /proc/self/mountinfo" # clean up -$TS_CMD_UMOUNT $DIR_SRC +$TS_CMD_UMOUNT $DIR_B rmdir $DIR_SRC $DIR_A $DIR_B ts_log "Success" |