diff options
Diffstat (limited to 'tests/ts/libmount/context-utab')
-rwxr-xr-x | tests/ts/libmount/context-utab | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/ts/libmount/context-utab b/tests/ts/libmount/context-utab index 24d528d87..a63ba57d6 100755 --- a/tests/ts/libmount/context-utab +++ b/tests/ts/libmount/context-utab @@ -44,7 +44,7 @@ DEVICE="${TS_DEVICE}1" udevadm settle -grep -q $DEVNAME /proc/partitions +grep -q " $DEVNAME\$" /proc/partitions if [ $? -ne 0 ]; then ts_skip "no partition!" fi @@ -67,14 +67,14 @@ udevadm settle ts_init_subtest "mount-by-devname" mkdir -p $MOUNTPOINT &> /dev/null ts_run $TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1 -grep -q $DEVICE /proc/mounts || \ +ts_is_mounted "$DEVICE" || \ echo "(by device) cannot find $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>&1 ts_finalize_subtest ts_init_subtest "umount-by-devname" ts_run $TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>&1 -grep -q $DEVICE /proc/mounts && +ts_is_mounted "$DEVICE" && echo "umount (device) failed: found $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>&1 ts_finalize_subtest @@ -82,14 +82,14 @@ ts_finalize_subtest ts_init_subtest "mount-uhelper" mkdir -p $MOUNTPOINT &> /dev/null ts_run $TESTPROG --mount -o uhelper=foo,rw LABEL="$LABEL" $MOUNTPOINT >> $TS_OUTPUT 2>&1 -grep -q $DEVICE $LIBMOUNT_UTAB || \ +grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" || \ echo "(by label) cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 ts_finalize_subtest ts_init_subtest "umount" ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 -grep -q $DEVICE $LIBMOUNT_UTAB && \ +grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" && \ echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 ts_finalize_subtest @@ -109,7 +109,7 @@ if type "mkfs.btrfs" &>/dev/null && mkfs.btrfs --version &>/dev/null; then ts_init_subtest "mount-uhelper-subvol" mkdir -p $MOUNTPOINT &> /dev/null ts_run $TESTPROG --mount -o uhelper=foo,rw,subvol=sub $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1 - grep -q $DEVICE $LIBMOUNT_UTAB || \ + grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" || \ echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 ts_finalize_subtest @@ -123,7 +123,7 @@ if type "mkfs.btrfs" &>/dev/null && mkfs.btrfs --version &>/dev/null; then ts_init_subtest "umount-subvol" ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 - grep -q $DEVICE $LIBMOUNT_UTAB && \ + grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" && \ echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 ts_finalize_subtest fi |