]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: don't use mount.<type> helpers in mount-by-pattern tests
authorKarel Zak <kzak@redhat.com>
Tue, 19 Dec 2017 12:46:35 +0000 (13:46 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 19 Dec 2017 12:46:35 +0000 (13:46 +0100)
The test behavior is fragile if depends on external helpers. Let's
keep it based on mount(2) only. The test will be faster too.

Note that "mount -t <pattern>" does not behaviour as expected with
helpers. We need to try another helper if the current one ends with
status=1 (waitpid()). Now it returns status from the first helper.

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/mount/fslists

index 64859ba380149f4d1b406b1b78589579f102b45b..de485319ad02163afb4595a8abad45ec48bc8601 100755 (executable)
@@ -71,7 +71,7 @@ ts_finalize_subtest
 
 ts_init_subtest "type-pattern"
 [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
-$TS_CMD_MOUNT -t nofoo,bar $DEVICE $TS_MOUNTPOINT >> $TS_OUTPUT 2>&1
+$TS_CMD_MOUNT -i -t nofoo,bar $DEVICE $TS_MOUNTPOINT >> $TS_OUTPUT 2>&1
 ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
 $TS_CMD_UMOUNT $TS_MOUNTPOINT
 ts_log "Success"
@@ -80,7 +80,7 @@ ts_finalize_subtest
 
 ts_init_subtest "type-pattern-neg"
 [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
-$TS_CMD_MOUNT -t nofoo,bar,ext3,ext2,ext4 $DEVICE $TS_MOUNTPOINT &> /dev/null
+$TS_CMD_MOUNT -i -t nofoo,bar,ext3,ext2,ext4 $DEVICE $TS_MOUNTPOINT &> /dev/null
 ts_is_mounted $DEVICE && ts_die "$DEVICE unexpectedly mounted"
 ts_log "Success"
 ts_finalize_subtest