From: Jeff Layton <jlayton@kernel.org>
To: fstests@vger.kernel.org
Cc: guan@eryu.me
Subject: [PATCH] common: handle ceph's new mount syntax
Date: Wed, 5 Jan 2022 12:30:13 -0500 [thread overview]
Message-ID: <20220105173013.172424-1-jlayton@kernel.org> (raw)
Cephfs is introducing a new mount device syntax. Fix the fstests
infrastructure to handle the new syntax correctly.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
common/config | 2 +-
common/rc | 34 ++++++++++++++++++++++++++++++++--
2 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/common/config b/common/config
index e0a5c5df58ff..be97436b0857 100644
--- a/common/config
+++ b/common/config
@@ -533,7 +533,7 @@ _check_device()
fi
case "$FSTYP" in
- 9p|tmpfs|virtiofs)
+ 9p|tmpfs|virtiofs|ceph)
# 9p and virtiofs mount tags are just plain strings, so anything is allowed
# tmpfs doesn't use mount source, ignore
;;
diff --git a/common/rc b/common/rc
index 7973ceb5fdf8..4fa0b818d840 100644
--- a/common/rc
+++ b/common/rc
@@ -1592,7 +1592,7 @@ _require_scratch_nocheck()
_notrun "this test requires a valid \$SCRATCH_MNT"
fi
;;
- nfs*|ceph)
+ nfs*)
echo $SCRATCH_DEV | grep -q ":/" > /dev/null 2>&1
if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
_notrun "this test requires a valid \$SCRATCH_DEV"
@@ -1601,6 +1601,21 @@ _require_scratch_nocheck()
_notrun "this test requires a valid \$SCRATCH_MNT"
fi
;;
+ ceph)
+ if [ -z "$SCRATCH_DEV" ]; then
+ _notrun "this test requires a valid \$SCRATCH_DEV"
+ fi
+ echo $SCRATCH_DEV | grep -q "=/" > /dev/null 2>&1
+ if [ "$?" != "0" ]; then
+ echo $SCRATCH_DEV | grep -q ":/" > /dev/null 2>&1
+ if [ "$?" != "0" ]; then
+ _notrun "this test requires a valid \$SCRATCH_DEV"
+ fi
+ fi
+ if [ ! -d "$SCRATCH_MNT" ]; then
+ _notrun "this test requires a valid \$SCRATCH_MNT"
+ fi
+ ;;
pvfs2)
echo $SCRATCH_DEV | grep -q "://" > /dev/null 2>&1
if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
@@ -1770,7 +1785,7 @@ _require_test()
_notrun "this test requires a valid \$TEST_DIR"
fi
;;
- nfs*|ceph)
+ nfs*)
echo $TEST_DEV | grep -q ":/" > /dev/null 2>&1
if [ -z "$TEST_DEV" -o "$?" != "0" ]; then
_notrun "this test requires a valid \$TEST_DEV"
@@ -1779,6 +1794,21 @@ _require_test()
_notrun "this test requires a valid \$TEST_DIR"
fi
;;
+ ceph)
+ if [ -z "$TEST_DEV" ]; then
+ _notrun "this test requires a valid \$TEST_DEV"
+ fi
+ echo $TEST_DEV | grep -q "=/" > /dev/null 2>&1
+ if [ "$?" != "0" ]; then
+ echo $TEST_DEV | grep -q ":/" > /dev/null 2>&1
+ if [ "$?" != "0" ]; then
+ _notrun "this test requires a valid \$TEST_DEV"
+ fi
+ fi
+ if [ ! -d "$TEST_DIR" ]; then
+ _notrun "this test requires a valid \$TEST_DIR"
+ fi
+ ;;
cifs)
echo $TEST_DEV | grep -q "//" > /dev/null 2>&1
if [ -z "$TEST_DEV" -o "$?" != "0" ]; then
--
2.33.1
next reply other threads:[~2022-01-05 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 17:30 Jeff Layton [this message]
2022-01-06 2:32 ` [PATCH] common: handle ceph's new mount syntax Zorro Lang
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=20220105173013.172424-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.