From 996248fd869836a17298786ec3e775de36ee169e Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Mon, 2 Mar 2020 11:42:54 +0100 Subject: [PATCH] test/iscsi_tgt: do not silently skip rbd.sh tests Remove if/exit steps from rbd.sh and move the condition to parent script iscsi_tgt.sh. Signed-off-by: Karol Latecki Change-Id: I86c9c659e0f8b4f544296e2ef8a861b25fd4f424 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1081 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Tomasz Zawadzki --- test/iscsi_tgt/iscsi_tgt.sh | 4 ++++ test/iscsi_tgt/rbd/rbd.sh | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/iscsi_tgt/iscsi_tgt.sh b/test/iscsi_tgt/iscsi_tgt.sh index 11cff211d..d76e03293 100755 --- a/test/iscsi_tgt/iscsi_tgt.sh +++ b/test/iscsi_tgt/iscsi_tgt.sh @@ -58,6 +58,10 @@ if [ $SPDK_TEST_RBD -eq 1 ]; then # RBD tests do not support network namespaces, # they can only be run on posix sockets. if [ "$TEST_TYPE" == "posix" ]; then + if ! hash ceph; then + echo "ERROR: SPDK_TEST_RBD requested but no ceph installed!" + false + fi run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh fi fi diff --git a/test/iscsi_tgt/rbd/rbd.sh b/test/iscsi_tgt/rbd/rbd.sh index 6c498ff0e..3c96a391c 100755 --- a/test/iscsi_tgt/rbd/rbd.sh +++ b/test/iscsi_tgt/rbd/rbd.sh @@ -9,11 +9,6 @@ source $rootdir/test/iscsi_tgt/common.sh # $2 = test type posix or vpp. defaults to posix. iscsitestinit $1 $2 -if ! hash ceph; then - echo "Ceph not detected on this system; skipping RBD tests" - exit 0 -fi - timing_enter rbd_setup rbd_setup $TARGET_IP $TARGET_NAMESPACE trap 'rbd_cleanup; exit 1' SIGINT SIGTERM EXIT