From d4345220cc85a803b8c029adb472fc4d9f580659 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 6 Jul 2017 19:30:19 +0200 Subject: [PATCH] tests: avoid masking return values Declare and assign separately to avoid masking return values. --- test/shell/fsadm-renamed.sh | 3 ++- test/shell/fsadm.sh | 3 ++- test/shell/lvresize-full.sh | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/shell/fsadm-renamed.sh b/test/shell/fsadm-renamed.sh index ed7b7436f..7f3a9fd75 100644 --- a/test/shell/fsadm-renamed.sh +++ b/test/shell/fsadm-renamed.sh @@ -28,7 +28,8 @@ mount_dir="mnt" mount_space_dir="mnt space dir" mount_dolar_dir="mnt \$SPACE dir" # for recursive call -export LVM_BINARY=$(which lvm) +LVM_BINARY=$(which lvm) +export LVM_BINARY test ! -d "$mount_dir" && mkdir "$mount_dir" test ! -d "$mount_space_dir" && mkdir "$mount_space_dir" diff --git a/test/shell/fsadm.sh b/test/shell/fsadm.sh index 351a179ba..fed7eb411 100644 --- a/test/shell/fsadm.sh +++ b/test/shell/fsadm.sh @@ -45,7 +45,8 @@ dev_vg_lv2="$DM_DEV_DIR/$vg_lv2" mount_dir="mnt" mount_space_dir="mnt space dir" # for recursive call -export LVM_BINARY=$(which lvm) +LVM_BINARY=$(which lvm) +export LVM_BINARY test ! -d "$mount_dir" && mkdir "$mount_dir" test ! -d "$mount_space_dir" && mkdir "$mount_space_dir" diff --git a/test/shell/lvresize-full.sh b/test/shell/lvresize-full.sh index b518bb751..c49778149 100644 --- a/test/shell/lvresize-full.sh +++ b/test/shell/lvresize-full.sh @@ -21,7 +21,8 @@ SKIP_WITH_LVMPOLLD=1 FSCK=${FSCK-fsck} MKFS=${MKFS-mkfs.ext3} RESIZEFS=${RESIZEFS-resize2fs} -export LVM_BINARY=$(which lvm) +LVM_BINARY=$(which lvm) +export LVM_BINARY which $FSCK || skip which $MKFS || skip