summaryrefslogtreecommitdiffstats
path: root/tests/ts/mount
diff options
context:
space:
mode:
authorBernhard Voelker2012-07-27 11:00:17 +0200
committerKarel Zak2012-07-30 16:07:36 +0200
commit018a38a64cda88b0402f55b616ef58168be1f7e9 (patch)
treed224ab6e66794c9fb8a2ae57d5ed0dfd3dcf7f09 /tests/ts/mount
parenttests: search mount point in canonicalized form in /proc/mounts (diff)
downloadkernel-qcow2-util-linux-018a38a64cda88b0402f55b616ef58168be1f7e9.tar.gz
kernel-qcow2-util-linux-018a38a64cda88b0402f55b616ef58168be1f7e9.tar.xz
kernel-qcow2-util-linux-018a38a64cda88b0402f55b616ef58168be1f7e9.zip
tests: use ts_is_mounted in mount/regfile
If the test directory is on a symlink, then mount/regfile failed because it did not search for the mount point in /proc/mounts canonicalized. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
Diffstat (limited to 'tests/ts/mount')
-rwxr-xr-xtests/ts/mount/regfile4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ts/mount/regfile b/tests/ts/mount/regfile
index c47c7d795..8d786adbf 100755
--- a/tests/ts/mount/regfile
+++ b/tests/ts/mount/regfile
@@ -21,7 +21,7 @@ $TS_CMD_MOUNT $IMAGE $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
DEVICE=$(awk '/regfile/ { print $1 }' /proc/mounts)
-grep -q "$TS_MOUNTPOINT" /proc/mounts || ts_die "Cannot find $TS_MOUNTPOINT in /proc/mounts"
+ts_is_mounted "$TS_MOUNTPOINT" || ts_die "Cannot find $TS_MOUNTPOINT in /proc/mounts"
if [ -f "/sys/block/$(basename $DEVICE)/loop/backing_file" ]; then
$TS_CMD_UMOUNT $IMAGE || ts_die "Cannot umount $IMAGE"
@@ -30,7 +30,7 @@ else
ts_skip "too old kernel"
fi
-grep -q "$TS_MOUNTPOINT" /proc/mounts && ts_die "$TS_MOUNTPOINT still in /proc/mounts"
+ts_is_mounted "$TS_MOUNTPOINT" && ts_die "$TS_MOUNTPOINT still in /proc/mounts"
ts_log "Success"
ts_finalize