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 <karol.latecki@intel.com>
Change-Id: I86c9c659e0f8b4f544296e2ef8a861b25fd4f424
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1081
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Karol Latecki 2020-03-02 11:42:54 +01:00 committed by Tomasz Zawadzki
parent 325010bf91
commit 996248fd86
2 changed files with 4 additions and 5 deletions

View File

@ -58,6 +58,10 @@ if [ $SPDK_TEST_RBD -eq 1 ]; then
# RBD tests do not support network namespaces, # RBD tests do not support network namespaces,
# they can only be run on posix sockets. # they can only be run on posix sockets.
if [ "$TEST_TYPE" == "posix" ]; then 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 run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh
fi fi
fi fi

View File

@ -9,11 +9,6 @@ source $rootdir/test/iscsi_tgt/common.sh
# $2 = test type posix or vpp. defaults to posix. # $2 = test type posix or vpp. defaults to posix.
iscsitestinit $1 $2 iscsitestinit $1 $2
if ! hash ceph; then
echo "Ceph not detected on this system; skipping RBD tests"
exit 0
fi
timing_enter rbd_setup timing_enter rbd_setup
rbd_setup $TARGET_IP $TARGET_NAMESPACE rbd_setup $TARGET_IP $TARGET_NAMESPACE
trap 'rbd_cleanup; exit 1' SIGINT SIGTERM EXIT trap 'rbd_cleanup; exit 1' SIGINT SIGTERM EXIT