public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: fstests@vger.kernel.org, david@fromorbit.com
Subject: Re: [PATCH v3] xfstests: update xfs/096 for new behaviour
Date: Wed, 13 Jul 2016 18:38:05 +0800	[thread overview]
Message-ID: <20160713103805.GS2432@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1467389674-5341-1-git-send-email-jtulak@redhat.com>

On Fri, Jul 01, 2016 at 06:14:34PM +0200, Jan Tulak wrote:
> Because we recently changed how mkfs behaves when it gets incorrect/invalid
> values, add a feature check to run this test only on older binaries, which
> accepts invalid sunit values.
> 
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> ---
> UPDATE:
> Change it to _notrun on newer binaries. Commit message updated respectivvely.
> ---
>  tests/xfs/096 | 22 ++++++++++++++++++----
>  1 file changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/xfs/096 b/tests/xfs/096
> index f949e83..803b49d 100755
> --- a/tests/xfs/096
> +++ b/tests/xfs/096
> @@ -39,6 +39,20 @@ _cleanup()
>      rm -f $tmp.*
>  }
>  
> +# maximum log record size
> +max_lr_size=`expr 256 \* 1024`
> +big_su=`expr $max_lr_size + 4096`
> +
> +requires_mkfs_accept_invalid_log_sunit()
> +{
> +	accepts=`mkfs.xfs -N -l version=2,su=$big_su 2>&1 | \
> +		grep -ci "No device name"`
> +	if [ "$accepts" -eq 0 ];then
> +		_notrun "Runs only on older xfsprogs accepting invalid log sunit"
> +	fi

You're counting the number of "No device name" string, which doesn't
seem reliable to me. I'd prefer to rely on whether mkfs.xfs really
accepts invalid log sunit, so how about:

require_mkfs_accept_invalid_log_sunit()
{
	local fsimg=$tmp.img
	touch $fsimg

	$MKFS_XFS_PROG -N -l version=2,su=$big_su -d name=$fsimg,size=1g >/dev/null 2>&1
	if [ $? -ne 0 ]; then
		_notrun "This test requires v4.5 or older xfsprogs"
	fi
}

(These mkfs argument checks went to v4.7-rc1, and v4.5 is the latest
"older" xfsprogs, right?)

Thanks,
Eryu

  reply	other threads:[~2016-07-13 10:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02  9:10 [PATCH] xfstests: update xfs/096 for new behaviour Jan Tulak
2016-06-07  3:45 ` Eryu Guan
     [not found]   ` <CACj3i733G7oz_tg4NANfz_=X5nYMp31k-FskEPXxHsaSxKtTEw@mail.gmail.com>
2016-06-07  8:31     ` Fwd: " Jan Tulak
2016-06-23 11:22     ` Jan Tulak
2016-06-23 11:41       ` Jan Tulak
2016-06-29 10:18 ` [PATCH v2] " Jan Tulak
2016-06-30  6:54   ` Eryu Guan
2016-07-01  0:37     ` Dave Chinner
2016-07-01  3:05       ` Eryu Guan
2016-07-01 12:12         ` Jan Tulak
2016-07-01 16:14 ` [PATCH v3] " Jan Tulak
2016-07-13 10:38   ` Eryu Guan [this message]
2016-07-14 10:25     ` Jan Tulak

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=20160713103805.GS2432@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=jtulak@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