From 96d9f4b68a8adcfe90bb28aed5d6dfc5a327db2a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 26 Sep 2018 14:20:09 -0700 Subject: [PATCH] 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 --- common/multipath-over-rdma | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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. -- 2.49.0