]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: remove LD_LIBRARY_PATH from swapon tests
authorKarel Zak <kzak@redhat.com>
Wed, 18 Apr 2012 11:05:55 +0000 (13:05 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Apr 2012 11:05:55 +0000 (13:05 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/commands.sh.in
tests/functions.sh
tests/ts/swapon/devname
tests/ts/swapon/fixpgsz
tests/ts/swapon/fixsig
tests/ts/swapon/label
tests/ts/swapon/uuid

index b01ebc7296a346acabadfe310dc736c8e86a9c74..2b2a5771e5137292bcc0cb6b97aee003b3ab30b6 100644 (file)
@@ -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"}
index 6556e4ed2ff35d61462ed290585043ef407c95e6..74cde97b3b33031d5974b022f285861c6212fa27 100644 (file)
@@ -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
 }
index 917b40b3c352db8b8ce89d8ea7de9a9dcdcd265f..cbab1285dcf0fed0cd1e88385aa7319d788b9ffd 100755 (executable)
@@ -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"
index ee03dde6a7aca539dd146a24c9b631ae814b2c9d..0a694add3accb77ec28e3cd50285fc5aec3cf90c 100755 (executable)
@@ -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"
index c3b811e81ba57439d0b0ca5b2ae93dd1a14537e5..2005dec4b631d4d01167c26072150b755e4dafaf 100755 (executable)
@@ -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"
index 3a5baa14253c9c1cdfe6d108ff260faabed2f8ec..5df0541c1a5ddf6e99090809b051cc0df87d734e 100755 (executable)
@@ -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"
index 413b46b912f42229333505fd18b5475a5e9a5493..f40720ce2e1d9d516cf79f63aa9f177778e26872 100755 (executable)
@@ -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"