From: Bart Van Assche Date: Wed, 26 Sep 2018 21:20:09 +0000 (-0700) Subject: common/multipath-over-rdma: Log fio exit code X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=96d9f4b68a8adcfe90bb28aed5d6dfc5a327db2a;p=users%2Fhch%2Fblktests.git common/multipath-over-rdma: Log fio exit code Log the fio exit code to make it easier to analyze test failures. Signed-off-by: Bart Van Assche --- diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma index 50cc74d..e2eaab5 100644 --- a/common/multipath-over-rdma +++ b/common/multipath-over-rdma @@ -516,7 +516,7 @@ test_fio_opt() { } run_fio() { - local a args avail_kb="" bd="" d="" j opt output + local a args avail_kb="" bd="" d="" j opt output rc args=("$@") j=1 @@ -553,11 +553,15 @@ run_fio() { done mkdir -p "${fio_aux_path}" echo "fio ${args[*]}" >>"$FULL" - fio "${args[@]}" 2>&1 || return $? - if [ -n "$output" ]; then + fio "${args[@]}" 2>&1 + rc=$? + if [ $rc = 0 ] && [ -n "$output" ]; then # Return exit code 1 if no I/O has been performed. grep -q ', io=[0-9].*, run=[0-9]' "$output" + rc=$? fi + echo "run_fio exit code: $rc" >>"$FULL" + return $rc } # Configure two null_blk instances.