diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/commands.sh.in | 6 | ||||
-rw-r--r-- | tests/functions.sh | 15 | ||||
-rwxr-xr-x | tests/ts/swapon/devname | 5 | ||||
-rwxr-xr-x | tests/ts/swapon/fixpgsz | 5 | ||||
-rwxr-xr-x | tests/ts/swapon/fixsig | 5 | ||||
-rwxr-xr-x | tests/ts/swapon/label | 5 | ||||
-rwxr-xr-x | tests/ts/swapon/uuid | 5 |
7 files changed, 12 insertions, 34 deletions
diff --git a/tests/commands.sh.in b/tests/commands.sh.in index b01ebc729..2b2a5771e 100644 --- a/tests/commands.sh.in +++ b/tests/commands.sh.in @@ -30,8 +30,6 @@ TS_HELPER_LOGINDEFS="$top_builddir/login-utils/test_logindefs" # TODO: use partx TS_HELPER_PARTITIONS="$top_builddir/libblkid/samples/partitions" -U_L_LIBRARY_PATH="$top_builddir/libblkid/src/.libs:$top_builddir/libuuid/src/.libs" - # paths to commands if [ -x "$top_builddir/sys-utils/mount" ]; then TS_CMD_MOUNT=${TS_CMD_MOUNT:-"$top_builddir/sys-utils/mount"} @@ -42,8 +40,8 @@ else TS_CMD_MTABLOCK=${TS_CMD_MTABLOCK:-"$top_builddir/mount/mtab_lock_test"} fi -TS_CMD_SWAPON=${TS_CMD_SWAPON:-"$top_builddir/sys-utils/.libs/swapon"} -TS_CMD_SWAPOFF=${TS_CMD_SWAPOFF:-"$top_builddir/sys-utils/.libs/swapoff"} +TS_CMD_SWAPON=${TS_CMD_SWAPON:-"$top_builddir/sys-utils/swapon"} +TS_CMD_SWAPOFF=${TS_CMD_SWAPOFF:-"$top_builddir/sys-utils/swapoff"} TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/sys-utils/losetup"} TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"$top_builddir/disk-utils/mkswap"} diff --git a/tests/functions.sh b/tests/functions.sh index 6556e4ed2..74cde97b3 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -387,21 +387,6 @@ function ts_is_mounted { return 1 } -function ts_swapoff { - local DEV="$1" - - # swapoff doesn't exist in build tree - if [ ! -x "$TS_CMD_SWAPOFF" ]; then - ln -sf $TS_CMD_SWAPON $TS_CMD_SWAPOFF - REMSWAPOFF="true" - fi - LD_LIBRARY_PATH="$U_L_LIBRARY_PATH" \ - $TS_CMD_SWAPOFF $DEV 2>&1 >> $TS_OUTPUT - if [ -n "$REMSWAPOFF" ]; then - rm -f $TS_CMD_SWAPOFF - fi -} - function ts_fstab_open { echo "# <!-- util-linux test entry" >> /etc/fstab } diff --git a/tests/ts/swapon/devname b/tests/ts/swapon/devname index 917b40b3c..cbab1285d 100755 --- a/tests/ts/swapon/devname +++ b/tests/ts/swapon/devname @@ -32,12 +32,11 @@ $TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT \ ts_device_has "TYPE" "swap" $DEVICE || ts_die "Cannot find swap on $DEVICE" $DEVICE -LD_LIBRARY_PATH="$U_L_LIBRARY_PATH" \ - $TS_CMD_SWAPON $DEVICE 2>&1 >> $TS_OUTPUT +$TS_CMD_SWAPON $DEVICE 2>&1 >> $TS_OUTPUT grep -q $DEVICE /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps" $DEVICE -ts_swapoff $DEVICE +$TS_CMD_SWAPOFF $DEVICE ts_device_deinit $DEVICE ts_log "Success" diff --git a/tests/ts/swapon/fixpgsz b/tests/ts/swapon/fixpgsz index ee03dde6a..0a694add3 100755 --- a/tests/ts/swapon/fixpgsz +++ b/tests/ts/swapon/fixpgsz @@ -32,12 +32,11 @@ ts_device_has "TYPE" "swap" $DEVICE || ts_die "Cannot find swap on $DEVICE" $DEV # # Swapon # -LD_LIBRARY_PATH="$U_L_LIBRARY_PATH" \ - $TS_CMD_SWAPON --fixpgsz $DEVICE &> /dev/null +$TS_CMD_SWAPON --fixpgsz $DEVICE &> /dev/null grep -q $DEVICE /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps" $DEVICE -ts_swapoff $DEVICE +$TS_CMD_SWAPOFF $DEVICE ts_device_deinit $DEVICE ts_log "Success" diff --git a/tests/ts/swapon/fixsig b/tests/ts/swapon/fixsig index c3b811e81..2005dec4b 100755 --- a/tests/ts/swapon/fixsig +++ b/tests/ts/swapon/fixsig @@ -34,12 +34,11 @@ ts_device_has "TYPE" "swsuspend" $DEVICE || ts_die "Cannot find swsuspend on $DE # # Swapon # -LD_LIBRARY_PATH="$U_L_LIBRARY_PATH" \ - $TS_CMD_SWAPON $DEVICE &> /dev/null +$TS_CMD_SWAPON $DEVICE &> /dev/null grep -q $DEVICE /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps" $DEVICE -ts_swapoff $DEVICE +$TS_CMD_SWAPOFF $DEVICE ts_device_deinit $DEVICE ts_log "Success" diff --git a/tests/ts/swapon/label b/tests/ts/swapon/label index 3a5baa142..5df0541c1 100755 --- a/tests/ts/swapon/label +++ b/tests/ts/swapon/label @@ -34,12 +34,11 @@ $TS_CMD_MKSWAP -L $LABEL $DEVICE > /dev/null 2>> $TS_OUTPUT \ ts_device_has "LABEL" $LABEL $DEVICE \ || ts_die "Cannot find LABEL '$LABEL' on $DEVICE" $DEVICE -LD_LIBRARY_PATH="$U_L_LIBRARY_PATH" \ - $TS_CMD_SWAPON -L $LABEL 2>&1 >> $TS_OUTPUT +$TS_CMD_SWAPON -L $LABEL 2>&1 >> $TS_OUTPUT grep -q $DEVICE /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps" $DEVICE -ts_swapoff $DEVICE +$TS_CMD_SWAPOFF $DEVICE ts_device_deinit $DEVICE ts_log "Success" diff --git a/tests/ts/swapon/uuid b/tests/ts/swapon/uuid index 413b46b91..f40720ce2 100755 --- a/tests/ts/swapon/uuid +++ b/tests/ts/swapon/uuid @@ -34,12 +34,11 @@ ts_device_has_uuid $DEVICE || ts_die "Cannot find UUID on $DEVICE" $DEVICE UUID=$(ts_uuid_by_devname $DEVICE) -LD_LIBRARY_PATH="$U_L_LIBRARY_PATH" \ - $TS_CMD_SWAPON -U $UUID 2>&1 >> $TS_OUTPUT +$TS_CMD_SWAPON -U $UUID 2>&1 >> $TS_OUTPUT grep -q $DEVICE /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps" $DEVICE -ts_swapoff $DEVICE +$TS_CMD_SWAPOFF $DEVICE ts_device_deinit $DEVICE ts_log "Success" |