A convenient way to debug the srp and nvmeof-mp tests scripts is to set
the debug variable in common/multipath-over-rdma. Examining what went
wrong during a test is only possible if teardown() is skipped after a
test failure. Make sure that this is the case.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
}
# Undo setup()
-teardown() {
+teardown_uncond() {
shutdown_client
killall -9 multipathd >&/dev/null
rm -f /etc/multipath.conf
unload_null_blk
}
+teardown() {
+ [ -z "$debug" ] && teardown_uncond
+}
+
# Set up test configuration with "$1" as multipath configuration file.
setup_test() {
local i m modules
return 1
fi
- if ! teardown; then
+ if ! teardown_uncond; then
echo "teardown() failed"
return 1
fi