From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: guaneryu@gmail.com, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
fstests@vger.kernel.org
Subject: [PATCH 3/6] xfs/189: skip 'barrier' mount option test on newer kernels
Date: Thu, 04 Oct 2018 17:19:26 -0700 [thread overview]
Message-ID: <153869876687.26648.3788433504474045378.stgit@magnolia> (raw)
In-Reply-To: <153869874763.26648.516233620615833277.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
Starting in Linux 4.19 the 'barrier' and 'nobarrier' mount options were
removed. If mount complains about a bad option when we remount with
'barrier', just skip the test.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
tests/xfs/189 | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tests/xfs/189 b/tests/xfs/189
index c1c52a22..2a2682ef 100755
--- a/tests/xfs/189
+++ b/tests/xfs/189
@@ -165,7 +165,19 @@ _test_remount_barrier()
echo
# mention barrier explicitly even if it's currently the default just to be sure
- _try_scratch_mount -o barrier
+ _try_scratch_mount -o barrier > $tmp.barriermount 2>&1
+
+ # If the kernel doesn't recognize 'barrier' as a mount option then
+ # just fake the output. The barrier option was removed in 4.19.
+ if grep -q "bad option" $tmp.barriermount; then
+ cat << ENDL
+SCRATCH_DEV on SCRATCH_MNT type xfs (rw)
+SCRATCH_DEV on SCRATCH_MNT type xfs (rw,nobarrier)
+SCRATCH_DEV on SCRATCH_MNT type xfs (rw)
+ENDL
+ return
+ fi
+
[ $? -eq 0 ] || echo "mount failed unexpectedly!"
_check_mount rw
next prev parent reply other threads:[~2018-10-05 7:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 0:19 [PATCH 0/6] fstests: fixes and new tests Darrick J. Wong
2018-10-05 0:19 ` [PATCH 1/6] generic: add bfoster's alternate reproducer Darrick J. Wong
2018-10-05 0:19 ` [PATCH 2/6] xfs: test mount time summary counter check and fix Darrick J. Wong
2018-10-05 0:19 ` Darrick J. Wong [this message]
2018-10-05 0:19 ` [PATCH 4/6] xfs/270: use _scratch_xfs_set_metadata_field to fuzz rocompat bits Darrick J. Wong
2018-10-05 6:54 ` Xiao Yang
2018-10-05 0:19 ` [PATCH 5/6] xfs/288: shut up verifier error Darrick J. Wong
2018-10-05 0:19 ` [PATCH 6/6] generic: test reflink side effects Darrick J. Wong
2018-10-14 15:40 ` Eryu Guan
2018-10-15 18:57 ` Darrick J. Wong
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=153869876687.26648.3788433504474045378.stgit@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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).