]> err.no Git - util-linux/commitdiff
tests: use findmnt(8) for remount test
authorKarel Zak <kzak@redhat.com>
Sun, 2 Jan 2011 22:04:47 +0000 (23:04 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 3 Jan 2011 11:28:49 +0000 (12:28 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/mount/remount

index d303703bbff63dc98fe8f9ddf670f6ac9f4b1710..33db5dca2755fb5c0dd0573cdb80b8e0782619b6 100755 (executable)
@@ -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