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>
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"
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