summaryrefslogtreecommitdiffstats
path: root/tests/ts
diff options
context:
space:
mode:
authorKarel Zak2011-01-02 23:04:47 +0100
committerKarel Zak2011-01-03 12:28:49 +0100
commitd440e09272df37e389fdc08bd7282391371bd03c (patch)
treed378b105162b414891cac83eb8d099879da7c041 /tests/ts
parenttests: use findmnt(8) for mount --move test (diff)
downloadkernel-qcow2-util-linux-d440e09272df37e389fdc08bd7282391371bd03c.tar.gz
kernel-qcow2-util-linux-d440e09272df37e389fdc08bd7282391371bd03c.tar.xz
kernel-qcow2-util-linux-d440e09272df37e389fdc08bd7282391371bd03c.zip
tests: use findmnt(8) for remount test
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts')
-rwxr-xr-xtests/ts/mount/remount4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ts/mount/remount b/tests/ts/mount/remount
index d303703bb..33db5dca2 100755
--- a/tests/ts/mount/remount
+++ b/tests/ts/mount/remount
@@ -42,8 +42,8 @@ $TS_CMD_MOUNT -o remount,ro $TS_MOUNTPOINT \
|| ts_die "Cannot remount $TS_MOUNTPOINT" $DEVICE
# check the remount
-egrep -q "^$DEVICE $TS_MOUNTPOINT ext2 ro 0 0" /etc/mtab \
- || ts_die "Cannot found remounted $TS_MOUNTPOINT in /etc/mtab" $DEVICE
+$TS_CMD_FINDMNT --kernel --target "$TS_MOUNTPOINT" --options "ro" &> /dev/null
+[ "$?" == "0" ] || ts_die "Cannot found read-only in $TS_MOUNTPOINT in /proc/self/mountinfo"
ts_device_deinit $DEVICE