All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fstests: xfs: add necessary version check for xfs/122
@ 2016-03-21  8:31 Xiaoguang Wang
  2016-03-22 22:56 ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Xiaoguang Wang @ 2016-03-21  8:31 UTC (permalink / raw)
  To: fstests; +Cc: Wang Xiaoguang

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>
---
 tests/xfs/122 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/xfs/122 b/tests/xfs/122
index 758cb50..8b35bed 100755
--- a/tests/xfs/122
+++ b/tests/xfs/122
@@ -41,6 +41,11 @@ _supported_fs xfs
 _supported_os Linux
 _require_command "$INDENT_PROG" indent
 
+# This test has been updated against xfsprogs 4.3.
+if [ $XFSPROGS_VERSION -lt 40300 ]; then
+	_notrun "this test needs xfsprogs version >= 4.3"
+fi
+
 # filter out known changes to xfs type sizes
 _type_size_filter()
 {
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] fstests: xfs: add necessary version check for xfs/122
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2016-03-22 22:56 UTC (permalink / raw)
  To: Xiaoguang Wang; +Cc: fstests

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.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fstests: xfs: add necessary version check for xfs/122
  2016-03-22 22:56 ` Dave Chinner
@ 2016-04-27  4:55   ` Xiaoguang Wang
  2016-04-29  1:05     ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Xiaoguang Wang @ 2016-04-27  4:55 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests

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

Regards,
Xiaoguang Wang

> 
> Cheers,
> 
> Dave.
> 




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fstests: xfs: add necessary version check for xfs/122
  2016-04-27  4:55   ` Xiaoguang Wang
@ 2016-04-29  1:05     ` Dave Chinner
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2016-04-29  1:05 UTC (permalink / raw)
  To: Xiaoguang Wang; +Cc: fstests

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-29  1:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.