public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: fstests <fstests@vger.kernel.org>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
	linux-xfs <linux-xfs@vger.kernel.org>,
	linux-nvdimm <linux-nvdimm@lists.01.org>, Jan Kara <jack@suse.cz>,
	Dave Chinner <david@fromorbit.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Amir Goldstein <amir73il@gmail.com>
Subject: [fstests PATCH v4 1/4] common/rc: add _scratch_has_mount_option()
Date: Fri, 17 Nov 2017 13:28:25 -0700	[thread overview]
Message-ID: <20171117202828.25472-2-ross.zwisler@linux.intel.com> (raw)
In-Reply-To: <20171117202828.25472-1-ross.zwisler@linux.intel.com>

Allow tests to inquire about whether a mount option is set, rather than
just disallowing it via _exclude_scratch_mount_option().

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Suggested-by: Amir Goldstein <amir73il@gmail.com>
---
 common/rc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/common/rc b/common/rc
index 0cda9da..701b1ff 100644
--- a/common/rc
+++ b/common/rc
@@ -3105,6 +3105,16 @@ _exclude_scratch_mount_option()
 	done
 }
 
+_scratch_has_mount_option()
+{
+	local mnt_opts=$(_normalize_mount_options)
+
+	if echo $mnt_opts | grep -qw "$1"; then
+		return 0
+	fi
+	return 1
+}
+
 _require_atime()
 {
 	_exclude_scratch_mount_option "noatime"
-- 
2.9.5


  reply	other threads:[~2017-11-17 20:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 20:28 [fstests PATCH v4 0/4] add test for DAX MAP_SYNC support Ross Zwisler
2017-11-17 20:28 ` Ross Zwisler [this message]
2017-11-17 20:28 ` [fstests PATCH v4 2/4] dm-log-writes: only replay log to marks that exist Ross Zwisler
2017-11-18  3:51   ` Eryu Guan
2017-11-17 20:28 ` [fstests PATCH v4 3/4] dm-log-writes: allow DAX to be used when possible Ross Zwisler
2017-11-18  6:17   ` Eryu Guan
2017-12-05 23:21     ` Ross Zwisler
2017-11-17 20:28 ` [fstests PATCH v4 4/4] generic: add test for DAX MAP_SYNC support Ross Zwisler

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=20171117202828.25472-2-ross.zwisler@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=amir73il@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-nvdimm@lists.01.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