fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: fstests@vger.kernel.org, darrick.wong@oracle.com
Subject: Re: [PATCH v2 2/2] common/rc: Update _exclude_scratch_mount_option() and _require_dm_target() for new dax option
Date: Thu, 16 Jul 2020 07:45:19 -0700	[thread overview]
Message-ID: <20200716144519.GN3008823@iweiny-DESK2.sc.intel.com> (raw)
In-Reply-To: <20200715162342.15192-2-yangx.jy@cn.fujitsu.com>

On Thu, Jul 16, 2020 at 12:23:42AM +0800, Xiao Yang wrote:
> Some tests(e.g. ext4/035) cannot include dax option(dax=inode/dax=never
> is OK) so make _exclude_scratch_mount_option() and _require_dm_target()
> check if old or new dax option is not defined in $MOUNT_OPTIONS.
> 
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> ---
>  common/rc | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index 8b19b3f7..7d0b8691 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1896,7 +1896,7 @@ _require_dm_target()
>  	_require_sane_bdev_flush $SCRATCH_DEV
>  	_require_command "$DMSETUP_PROG" dmsetup
>  
> -	echo $MOUNT_OPTIONS | grep -q dax
> +	_normalize_mount_options | egrep -q "dax(=always| |$)"
>  	if [ $? -eq 0 ]; then
>  		case $target in
>  		stripe|linear|log-writes)
> @@ -3452,12 +3452,16 @@ _normalize_mount_options()
>  }
>  
>  # skip test if MOUNT_OPTIONS contains the given strings
> +# For dax option, only accept dax/dax=always mount option
>  _exclude_scratch_mount_option()
>  {
>  	local mnt_opts=$(_normalize_mount_options)
> +	local pattern=$1
> +
> +	echo "$pattern" | grep -q 'dax' && pattern="dax(=always| |$)"
>  
>  	while [ $# -gt 0 ]; do
> -		if echo $mnt_opts | grep -qw "$1"; then
> +		if echo $mnt_opts | egrep -q "$pattern"; then
>  			_notrun "mount option \"$1\" not allowed in this test"
>  		fi
>  		shift
> -- 
> 2.21.0
> 
> 
> 

  reply	other threads:[~2020-07-16 14:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 16:23 [PATCH v2 1/2] common/dmlogwrites: Update _require_log_writes_dax() for new dax option Xiao Yang
2020-07-15 16:23 ` [PATCH v2 2/2] common/rc: Update _exclude_scratch_mount_option() and _require_dm_target() " Xiao Yang
2020-07-16 14:45   ` Ira Weiny [this message]
2020-07-16  5:32 ` [PATCH v2 1/2] common/dmlogwrites: Update _require_log_writes_dax() " Xiao Yang

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=20200716144519.GN3008823@iweiny-DESK2.sc.intel.com \
    --to=ira.weiny@intel.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=yangx.jy@cn.fujitsu.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).