public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] check: skip parsing if the file is not shell script.
@ 2018-10-24 14:33 Masayoshi Mizuma
  2018-10-28 13:44 ` Eryu Guan
  0 siblings, 1 reply; 3+ messages in thread
From: Masayoshi Mizuma @ 2018-10-24 14:33 UTC (permalink / raw)
  To: fstests; +Cc: Masayoshi Mizuma, Masayoshi Mizuma

From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>

If we run tests using '*', for example './check xfs/*', we will
get following error messages. This patch introduces to avoid
the messages.

./check xfs/*
xfs/001.out - unknown test, ignored
xfs/002.out - unknown test, ignored
xfs/003.out - unknown test, ignored
xfs/004.out - unknown test, ignored
...

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
---
 check | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/check b/check
index f3c8021d..96cb222f 100755
--- a/check
+++ b/check
@@ -339,6 +339,10 @@ if $have_test_arg; then
 				test_dir=`dirname $t`
 				test_dir=${test_dir#$SRC_DIR/*}
 				test_name=`basename $t`
+				if ! file -bi $SRC_DIR/$test_dir/$test_name | \
+					egrep -q 'text/x-shellscript'; then
+					continue
+				fi
 				group_file=$SRC_DIR/$test_dir/group
 
 				if egrep -q "^$test_name" $group_file; then
-- 
2.18.0

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

* Re: [PATCH] check: skip parsing if the file is not shell script.
  2018-10-24 14:33 [PATCH] check: skip parsing if the file is not shell script Masayoshi Mizuma
@ 2018-10-28 13:44 ` Eryu Guan
  2018-10-29 13:44   ` Masayoshi Mizuma
  0 siblings, 1 reply; 3+ messages in thread
From: Eryu Guan @ 2018-10-28 13:44 UTC (permalink / raw)
  To: Masayoshi Mizuma; +Cc: fstests, Masayoshi Mizuma

On Wed, Oct 24, 2018 at 10:33:07AM -0400, Masayoshi Mizuma wrote:
> From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> 
> If we run tests using '*', for example './check xfs/*', we will
> get following error messages. This patch introduces to avoid
> the messages.
> 
> ./check xfs/*
> xfs/001.out - unknown test, ignored
> xfs/002.out - unknown test, ignored
> xfs/003.out - unknown test, ignored
> xfs/004.out - unknown test, ignored
> ...

Hmm, that's just not the recommended way to run tests. Not all tests are
valid (yes, there're broken tests) and sometimes we may forget to add x
permission on a test (though I have a local script to catch that, but it
did happen before).

Please either use a more precise pattern to match the tests you want to
run, or even better, run tests by specifying the groups, e.g.

./check -g xfs/log

to run all tests in 'log' group in 'xfs' directory.

Thanks,
Eryu

> 
> Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> ---
>  check | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/check b/check
> index f3c8021d..96cb222f 100755
> --- a/check
> +++ b/check
> @@ -339,6 +339,10 @@ if $have_test_arg; then
>  				test_dir=`dirname $t`
>  				test_dir=${test_dir#$SRC_DIR/*}
>  				test_name=`basename $t`
> +				if ! file -bi $SRC_DIR/$test_dir/$test_name | \
> +					egrep -q 'text/x-shellscript'; then
> +					continue
> +				fi
>  				group_file=$SRC_DIR/$test_dir/group
>  
>  				if egrep -q "^$test_name" $group_file; then
> -- 
> 2.18.0
> 

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

* Re: [PATCH] check: skip parsing if the file is not shell script.
  2018-10-28 13:44 ` Eryu Guan
@ 2018-10-29 13:44   ` Masayoshi Mizuma
  0 siblings, 0 replies; 3+ messages in thread
From: Masayoshi Mizuma @ 2018-10-29 13:44 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, Masayoshi Mizuma

On Sun, Oct 28, 2018 at 09:44:52PM +0800, Eryu Guan wrote:
> On Wed, Oct 24, 2018 at 10:33:07AM -0400, Masayoshi Mizuma wrote:
> > From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> > 
> > If we run tests using '*', for example './check xfs/*', we will
> > get following error messages. This patch introduces to avoid
> > the messages.
> > 
> > ./check xfs/*
> > xfs/001.out - unknown test, ignored
> > xfs/002.out - unknown test, ignored
> > xfs/003.out - unknown test, ignored
> > xfs/004.out - unknown test, ignored
> > ...
> 
> Hmm, that's just not the recommended way to run tests. Not all tests are
> valid (yes, there're broken tests) and sometimes we may forget to add x
> permission on a test (though I have a local script to catch that, but it
> did happen before).

Got it, thanks!

> Please either use a more precise pattern to match the tests you want to
> run, or even better, run tests by specifying the groups, e.g.
> 
> ./check -g xfs/log
> 
> to run all tests in 'log' group in 'xfs' directory.

What is the better way to run all the tests?
Should I set the all groups? look like check -g xfs/auto,xfs/ioctl,...?

Thanks,
Masa

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

end of thread, other threads:[~2018-10-29 22:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-24 14:33 [PATCH] check: skip parsing if the file is not shell script Masayoshi Mizuma
2018-10-28 13:44 ` Eryu Guan
2018-10-29 13:44   ` Masayoshi Mizuma

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