public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] fstests: xfs: add necessary version check for xfs/122
Date: Fri, 29 Apr 2016 11:05:31 +1000	[thread overview]
Message-ID: <20160429010531.GM18496@dastard> (raw)
In-Reply-To: <5720462B.4050900@cn.fujitsu.com>

On Wed, Apr 27, 2016 at 12:55:07PM +0800, Xiaoguang Wang wrote:
> hello,
> 
> On 03/23/2016 06:56 AM, Dave Chinner wrote:
> > On Mon, Mar 21, 2016 at 04:31:28PM +0800, Xiaoguang Wang wrote:
> >> From: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
> >>
> >> Since commit c0cfa5651f2d ("xfs/122: update against xfsprogs 4.3"), xfs/122
> >> has been updated against xfsprogs 4.3, so add necessary version check.
> >>
> >> Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
> > 
> > This sort of version test belongs in autoconf, not the tests
> > themselves.
> Would you please give me some hints about how to add version test
> in autoconf,

Well, first it helps to see what the problem is that your are trying
ot work around. In general, if it's a compilation problem of a test
program, then we use autoconf to set conditional defines to
determine what gets compiled, and then write code that works for
all the different versions we need to support.

In this case, it's the test that is building source code to be
compiled, so the problem is likely the test itself and the way it
assmebles the header files for inclusion. That's what would need to
be fixed....

> also in xfs/188,
> I see similar usage:
>     if [ $XFSPROGS_VERSION -lt 21000 ]; then
>         _notrun "this test requires case-insensitive support"
>     fi

That's really old and was done before we settled on the _require*
rules patterns for explicitly checking for support in tools.

Indeed, this should simply check whether mkfs supports the "-n
version=ci" parameter, as we do for things like CRC support...

i.e.

_requires_xfs_case_insensitive()
{
	_scratch_mkfs_xfs_supported -n version=ci >/dev/null 2>&1 \
	           || _notrun "mkfs.xfs doesn't have case-insensitive feature"
}

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2016-04-29  1:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21  8:31 [PATCH] fstests: xfs: add necessary version check for xfs/122 Xiaoguang Wang
2016-03-22 22:56 ` Dave Chinner
2016-04-27  4:55   ` Xiaoguang Wang
2016-04-29  1:05     ` Dave Chinner [this message]

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=20160429010531.GM18496@dastard \
    --to=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=wangxg.fnst@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