public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: fix the regex pattern in get_group_list of check
@ 2013-04-12  6:12 Wang Sheng-Hui
  2013-04-12  7:57 ` Dave Chinner
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Sheng-Hui @ 2013-04-12  6:12 UTC (permalink / raw)
  To: Rich Johnston, Dave Chinner, xfstests

In group files, non comment line starts with a 3-digits, then followed by
space and other characters, but no group names.

The old regex in get_group_list uses the group name as part of the regex,
and fails './check -g xfs' run:
         Group "xfs" is empty or not defined?

The patch removes the pattern for group name, and thus we can trigger tests
like "./check -g xfs" as normal.
	

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
  check | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check b/check
index 966fbe5..abc65cb 100755
--- a/check
+++ b/check
@@ -100,7 +100,7 @@ get_group_list()
  		l=$(sed -n < $SRC_DIR/$d/group \
  			-e 's/#.*//' \
  			-e 's/$/ /' \
-			-e "s;\(^[0-9][0-9][0-9]\).* $grp .*;$SRC_DIR/$d/\1;p")
+			-e "s;\(^[0-9][0-9][0-9]\) .*;$SRC_DIR/$d/\1;p")
  		grpl="$grpl $l"
  	done
  	echo $grpl
-- 
1.7.12.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] xfstests: fix the regex pattern in get_group_list of check
  2013-04-12  6:12 [PATCH] xfstests: fix the regex pattern in get_group_list of check Wang Sheng-Hui
@ 2013-04-12  7:57 ` Dave Chinner
  2013-04-12 16:38   ` Wang Sheng-Hui
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2013-04-12  7:57 UTC (permalink / raw)
  To: Wang Sheng-Hui; +Cc: xfstests, Rich Johnston, Dave Chinner

On Fri, Apr 12, 2013 at 02:12:35PM +0800, Wang Sheng-Hui wrote:
> In group files, non comment line starts with a 3-digits, then followed by
> space and other characters, but no group names.

I don't follow. A group file line looks like:

003 db auto quick

Which defines the test name, followed by the group names the test
belongs to.

> The old regex in get_group_list uses the group name as part of the regex,
> and fails './check -g xfs' run:
>         Group "xfs" is empty or not defined?

Well, yes, "xfs" is not a defined group name:

$ grep xfs tests/*/group
$

If I define a "xfs" group by assigning tests to it, check runs just
fine.

$ grep xfs tests/*/group
tests/xfs/group:003 db auto quick xfs
$ sudo ./check -g xfs
FSTYP         -- xfs (debug)
PLATFORM      -- Linux/x86_64 test-2 3.9.0-rc4-dgc+
MKFS_OPTIONS  -- -f -bsize=4096 /dev/vdb
MOUNT_OPTIONS -- /dev/vdb /mnt/scratch

xfs/003  1s
Ran: xfs/003
Passed all 1 tests
$

So what check is doing looks perfectly OK to me and doesn't need
changing.

> The patch removes the pattern for group name, and thus we can trigger tests
> like "./check -g xfs" as normal.

If you want to run all the tests in a specific subdirectory regardless
of groups, then you can do it like:

$ sudo ./check xfs/[0-9][0-9][0-9]
FSTYP         -- xfs (debug)
PLATFORM      -- Linux/x86_64 test-2 3.9.0-rc4-dgc+
MKFS_OPTIONS  -- -f -bsize=4096 /dev/vdb
MOUNT_OPTIONS -- /dev/vdb /mnt/scratch

xfs/003  0s
xfs/004  0s
xfs/008  1s
.....

There's definitely better ways to do this, but conflating source tree
layout with runtime test group definitions is not it. ;)

Perhaps something like "check xfs" will just run all tests in the
xfs test dir, similar for ext4, shared, etc?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] xfstests: fix the regex pattern in get_group_list of check
  2013-04-12  7:57 ` Dave Chinner
@ 2013-04-12 16:38   ` Wang Sheng-Hui
  0 siblings, 0 replies; 3+ messages in thread
From: Wang Sheng-Hui @ 2013-04-12 16:38 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfstests, Rich Johnston, Dave Chinner

On 2013年04月12日 15:57, Dave Chinner wrote:
> On Fri, Apr 12, 2013 at 02:12:35PM +0800, Wang Sheng-Hui wrote:
>> In group files, non comment line starts with a 3-digits, then followed by
>> space and other characters, but no group names.
>
> I don't follow. A group file line looks like:
>
> 003 db auto quick
>
> Which defines the test name, followed by the group names the test
> belongs to.
>
>> The old regex in get_group_list uses the group name as part of the regex,
>> and fails './check -g xfs' run:
>>          Group "xfs" is empty or not defined?
>
> Well, yes, "xfs" is not a defined group name:
>
> $ grep xfs tests/*/group
> $
>
> If I define a "xfs" group by assigning tests to it, check runs just
> fine.
>
> $ grep xfs tests/*/group
> tests/xfs/group:003 db auto quick xfs
> $ sudo ./check -g xfs
> FSTYP         -- xfs (debug)
> PLATFORM      -- Linux/x86_64 test-2 3.9.0-rc4-dgc+
> MKFS_OPTIONS  -- -f -bsize=4096 /dev/vdb
> MOUNT_OPTIONS -- /dev/vdb /mnt/scratch
>
> xfs/003  1s
> Ran: xfs/003
> Passed all 1 tests
> $
>
> So what check is doing looks perfectly OK to me and doesn't need
> changing.
>
>> The patch removes the pattern for group name, and thus we can trigger tests
>> like "./check -g xfs" as normal.
>
> If you want to run all the tests in a specific subdirectory regardless
> of groups, then you can do it like:
>
> $ sudo ./check xfs/[0-9][0-9][0-9]

Thanks, Dave.

I confused the group with fs type.

> FSTYP         -- xfs (debug)
> PLATFORM      -- Linux/x86_64 test-2 3.9.0-rc4-dgc+
> MKFS_OPTIONS  -- -f -bsize=4096 /dev/vdb
> MOUNT_OPTIONS -- /dev/vdb /mnt/scratch
>
> xfs/003  0s
> xfs/004  0s
> xfs/008  1s
> .....
>
> There's definitely better ways to do this, but conflating source tree
> layout with runtime test group definitions is not it. ;)
>
> Perhaps something like "check xfs" will just run all tests in the
> xfs test dir, similar for ext4, shared, etc?
>
> Cheers,
>
> Dave.
>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2013-04-12 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-12  6:12 [PATCH] xfstests: fix the regex pattern in get_group_list of check Wang Sheng-Hui
2013-04-12  7:57 ` Dave Chinner
2013-04-12 16:38   ` Wang Sheng-Hui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox