summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-04-24 14:40:15 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2014-04-24 14:42:27 +0200
commit22037ee3289d3929b534812905b5c6d30f9ee4f8 (patch)
tree8724f9ec8d202f3582aa84c13e4aa21b201e72af
parent8e8a47143fa920b49f279ec4d096022a1afb36ec (diff)
downloadlvm2-22037ee3289d3929b534812905b5c6d30f9ee4f8.tar.gz
tests: fix creation of scsi debug
Use proper '||' test form to avoid unwanted test abort on failure. (i.e. running failing test profiles-thin.sh on a real /dev)
-rw-r--r--test/lib/aux.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 76cfd8248..8b765e940 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -302,7 +302,7 @@ prepare_scsi_debug_dev() {
local DEV_SIZE=$1
local SCSI_DEBUG_PARAMS=${@:2}
- test -f "SCSI_DEBUG_DEV" && return 0
+ test ! -f "SCSI_DEBUG_DEV" || return 0
test -z "$LOOP"
test -n "$DM_DEV_DIR"
@@ -311,7 +311,7 @@ prepare_scsi_debug_dev() {
# Skip test if scsi_debug module is unavailable or is already in use
modprobe --dry-run scsi_debug || skip
- lsmod | grep -q scsi_debug && skip
+ lsmod | not grep -q scsi_debug || skip
# Create the scsi_debug device and determine the new scsi device's name
# NOTE: it will _never_ make sense to pass num_tgts param;
@@ -327,7 +327,7 @@ prepare_scsi_debug_dev() {
echo "$SCSI_DEBUG_DEV" > SCSI_DEBUG_DEV
echo "$SCSI_DEBUG_DEV" > LOOP
# Setting $LOOP provides means for prepare_devs() override
- test "$LVM_TEST_DEVDIR" != "/dev" && ln -snf "$DEBUG_DEV" "$SCSI_DEBUG_DEV"
+ test "$LVM_TEST_DEVDIR" = "/dev" || ln -snf "$DEBUG_DEV" "$SCSI_DEBUG_DEV"
}
cleanup_scsi_debug_dev() {