]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: minor changes to make tests more portable
authorKarel Zak <kzak@redhat.com>
Mon, 26 Aug 2013 11:48:40 +0000 (13:48 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 26 Aug 2013 11:48:40 +0000 (13:48 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/functions.sh
tests/ts/cramfs/mkfs
tests/ts/libmount/context-utab
tests/ts/libmount/context-utab-py

index 361ab70759aa68d8477a2a1590ed6912aab31a0a..7d968869123b9da55373b952c16c01fbd7d8c9d6 100644 (file)
@@ -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}"
index e5fa47ffce00ad8ba2a60d8b89ec8d4c19feaea5..5facfe9a5b3e357ba097d8fadffa676ac1e3342d 100755 (executable)
@@ -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"
index 35851628d82c280017508571ce747ba31f4233d0..859fc2bca1b58538d4ece11743efce60fec3c6fb 100755 (executable)
@@ -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
index b2c0e2ed0f6ab83486cc77173333533bc93ce2ec..40dcba4d98ad7d2cf5e66fbd518d3eb1dec65279 100755 (executable)
@@ -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