diff options
author | Karel Zak | 2013-08-26 13:48:40 +0200 |
---|---|---|
committer | Karel Zak | 2013-08-26 13:48:40 +0200 |
commit | ef2c9e3f5e51cf13ec9cf6738d4f1d695ee32a6f (patch) | |
tree | 326a013c3fbc74592a0f0f1affc03a8fefa7b33f /tests | |
parent | swapon: cleanup man page (diff) | |
download | kernel-qcow2-util-linux-ef2c9e3f5e51cf13ec9cf6738d4f1d695ee32a6f.tar.gz kernel-qcow2-util-linux-ef2c9e3f5e51cf13ec9cf6738d4f1d695ee32a6f.tar.xz kernel-qcow2-util-linux-ef2c9e3f5e51cf13ec9cf6738d4f1d695ee32a6f.zip |
tests: minor changes to make tests more portable
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functions.sh | 2 | ||||
-rwxr-xr-x | tests/ts/cramfs/mkfs | 2 | ||||
-rwxr-xr-x | tests/ts/libmount/context-utab | 2 | ||||
-rwxr-xr-x | tests/ts/libmount/context-utab-py | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index 361ab7075..7d9688691 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -492,7 +492,7 @@ function ts_scsi_debug_init { modprobe scsi_debug $* [ "$?" == 0 ] || ts_die "Cannot init device" - DEVNAME=$(grep scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') + DEVNAME=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') [ "x${DEVNAME}" == "x" ] && ts_die "Cannot find device" DEVICE="/dev/${DEVNAME}" diff --git a/tests/ts/cramfs/mkfs b/tests/ts/cramfs/mkfs index e5fa47ffc..5facfe9a5 100755 --- a/tests/ts/cramfs/mkfs +++ b/tests/ts/cramfs/mkfs @@ -80,7 +80,7 @@ cd $TS_MOUNTPOINT ts_log "list the image" export TZ='GMT-1' -ls -laR --time-style=long-iso . >> $TS_OUTPUT +ls -laR --time-style=long-iso . | sed 's:\. : :g' >> $TS_OUTPUT echo >> $TS_OUTPUT ts_log "list checksums from new data" diff --git a/tests/ts/libmount/context-utab b/tests/ts/libmount/context-utab index 35851628d..859fc2bca 100755 --- a/tests/ts/libmount/context-utab +++ b/tests/ts/libmount/context-utab @@ -85,7 +85,9 @@ grep -q $DEVICE $LIBMOUNT_UTAB && \ echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 ts_finalize_subtest + if [ -x "/sbin/mkfs.btrfs" ]; then + $TS_CMD_WIPEFS -a $DEVICE &> /dev/null ts_log "Create filesystem [btrfs]" /sbin/mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null udevadm settle diff --git a/tests/ts/libmount/context-utab-py b/tests/ts/libmount/context-utab-py index b2c0e2ed0..40dcba4d9 100755 --- a/tests/ts/libmount/context-utab-py +++ b/tests/ts/libmount/context-utab-py @@ -84,6 +84,7 @@ grep -q $DEVICE $LIBMOUNT_UTAB && \ ts_finalize_subtest if [ -x "/sbin/mkfs.btrfs" ]; then + $TS_CMD_WIPEFS -a $DEVICE &> /dev/null ts_log "Create filesystem [btrfs]" /sbin/mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null udevadm settle |