From: Bart Van Assche Date: Tue, 25 Sep 2018 23:35:58 +0000 (-0700) Subject: common/multipath-over-rdma: Improve robustness X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4c10100b449ef5a5d81e01e1983d77feb72c8f11;p=users%2Fsagi%2Fblktests.git common/multipath-over-rdma: Improve robustness Detect all test setup failures and report any failures. Signed-off-by: Bart Van Assche --- diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma index c87667e..50cc74d 100644 --- a/common/multipath-over-rdma +++ b/common/multipath-over-rdma @@ -339,6 +339,7 @@ get_bdev_n() { sleep .1 done if ! blockdev --getbsz "$dev" >&/dev/null; then + echo "$dev: querying block size failed" return 1 fi b=$(basename "$realdev") @@ -615,7 +616,10 @@ setup_test() { set -u - shutdown_client || return $? + if ! shutdown_client; then + echo "failed to shutdown client" + return 1 + fi if ! teardown; then echo "teardown() failed" @@ -637,7 +641,7 @@ setup_test() { modprobe null_blk nr_devices=0 || return $? - configure_null_blk + configure_null_blk || return $? if [ ! -e /etc/multipath.conf ]; then ( @@ -660,6 +664,7 @@ setup_test() { done fi - setup_rdma - start_target + setup_rdma || return $? + start_target || return $? + echo "Test setup finished" >>"$FULL" }