From: xiubli@redhat.com
To: fstests@vger.kernel.org
Cc: david@fromorbit.com, djwong@kernel.org,
ceph-devel@vger.kernel.org, vshankar@redhat.com,
zlang@redhat.com, Xiubo Li <xiubli@redhat.com>
Subject: [PATCH] generic/{075,112}: fix printing the incorrect return value of fsx
Date: Wed, 1 Mar 2023 11:06:20 +0800 [thread overview]
Message-ID: <20230301030620.137153-1-xiubli@redhat.com> (raw)
From: Xiubo Li <xiubli@redhat.com>
We need to save the result of the 'fsx' temporarily.
Fixes: https://tracker.ceph.com/issues/58834
Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
tests/generic/075 | 6 ++++--
tests/generic/112 | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/tests/generic/075 b/tests/generic/075
index 03a394a6..bc3a11c7 100755
--- a/tests/generic/075
+++ b/tests/generic/075
@@ -53,9 +53,11 @@ _do_test()
# This cd and use of -P gets full debug on "$RESULT_DIR" (not TEST_DEV)
cd $out
- if ! $here/ltp/fsx $_param -P "$RESULT_DIR" $seq.$_n $FSX_AVOID &>/dev/null
+ $here/ltp/fsx $_param -P "$RESULT_DIR" $seq.$_n $FSX_AVOID &>/dev/null
+ local res=$?
+ if [ $res -ne 0 ]
then
- echo " fsx ($_param) failed, $? - compare $seqres.$_n.{good,bad,fsxlog}"
+ echo " fsx ($_param) failed, $res - compare $seqres.$_n.{good,bad,fsxlog}"
mv $out/$seq.$_n $seqres.$_n.full
od -xAx $seqres.$_n.full > $seqres.$_n.bad
od -xAx "$RESULT_DIR"/$seq.$_n.fsxgood > $seqres.$_n.good
diff --git a/tests/generic/112 b/tests/generic/112
index 971d0467..0e08cbf9 100755
--- a/tests/generic/112
+++ b/tests/generic/112
@@ -53,9 +53,11 @@ _do_test()
# This cd and use of -P gets full debug on "$RESULT_DIR" (not TEST_DEV)
cd $out
- if ! $here/ltp/fsx $_param -P "$RESULT_DIR" $FSX_AVOID $seq.$_n &>/dev/null
+ $here/ltp/fsx $_param -P "$RESULT_DIR" $FSX_AVOID $seq.$_n &>/dev/null
+ local res=$?
+ if [ $res -ne 0 ]
then
- echo " fsx ($_param) returned $? - see $seq.$_n.full"
+ echo " fsx ($_param) returned $res - see $seq.$_n.full"
mv "$RESULT_DIR"/$seq.$_n.fsxlog $seqres.$_n.full
status=1
exit
--
2.31.1
next reply other threads:[~2023-03-01 3:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 3:06 xiubli [this message]
2023-03-01 15:55 ` [PATCH] generic/{075,112}: fix printing the incorrect return value of fsx Darrick J. Wong
2023-03-02 15:38 ` Zorro Lang
2023-03-08 2:59 ` Xiubo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230301030620.137153-1-xiubli@redhat.com \
--to=xiubli@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=vshankar@redhat.com \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).