Patchwork [-v2] check: add support for an external file containing tests to exclude

login
register
mail settings
Submitter Theodore Ts'o
Date April 16, 2014, 4:58 a.m.
Message ID <1397624302-9577-1-git-send-email-tytso@mit.edu>
Download mbox | patch
Permalink /patch/339430/
State Not Applicable
Headers show

Comments

Theodore Ts'o - April 16, 2014, 4:58 a.m.
Currently the -X option is intended to specify a set of expunging
files which are stored in each test/* subdirectory.  As described in
the commit description for 0b1e8abd4, in order to exclude the test
generic/280, the -X option is used as follows:

    $ cat tests/generic/3.0-stable-avoid
    280
    $ sudo ./check -X 3.0-stable-avoid generic/280

However, it is sometimes useful to store the set of expunged tests in
a single file, outside of tests/* subdirectories.  This commit enables
the following:

    $ cat /root/conf/data_journal.exclude
    generic/068
    ext4/301
    $ sudo ./check -E /root/conf/data_journal.exclude -g auto

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 check | 6 ++++++
 1 file changed, 6 insertions(+)
Dave Chinner - April 16, 2014, 6:40 a.m.
On Wed, Apr 16, 2014 at 12:58:22AM -0400, Theodore Ts'o wrote:
> Currently the -X option is intended to specify a set of expunging
> files which are stored in each test/* subdirectory.  As described in
> the commit description for 0b1e8abd4, in order to exclude the test
> generic/280, the -X option is used as follows:
> 
>     $ cat tests/generic/3.0-stable-avoid
>     280
>     $ sudo ./check -X 3.0-stable-avoid generic/280
> 
> However, it is sometimes useful to store the set of expunged tests in
> a single file, outside of tests/* subdirectories.  This commit enables
> the following:
> 
>     $ cat /root/conf/data_journal.exclude
>     generic/068
>     ext4/301
>     $ sudo ./check -E /root/conf/data_journal.exclude -g auto
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> ---
>  check | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/check b/check
> index e7ace63..b1eaed2 100755
> --- a/check
> +++ b/check
> @@ -81,6 +81,7 @@ testlist options
>      -g group[,group...]	include tests from these groups
>      -x group[,group...]	exclude tests from these groups
>      -X file		exclude individual tests
> +    -E external_file	exclude individual tests
>      [testlist]		include tests matching names in testlist
>  '
>  	    exit 0
> @@ -222,6 +223,11 @@ while [ $# -gt 0 ]; do
>  			done
>  		done
>  		;;
> +	-E)	xfile=$2; shift ;
> +		if [ -f $xfile ]; then
> +			cat "$xfile" >> $tmp.xlist
> +	        fi
> +		;;
>  	-s)	RUN_SECTION="$RUN_SECTION $2"; shift ;;
>  	-l)	diff="diff" ;;
>  	-udiff)	diff="$diff -u" ;;

Looks good.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

Cheers,

Dave.
Theodore Ts'o - May 12, 2014, 12:42 p.m.
On Wed, Apr 16, 2014 at 04:40:18PM +1000, Dave Chinner wrote:
> On Wed, Apr 16, 2014 at 12:58:22AM -0400, Theodore Ts'o wrote:
> > Currently the -X option is intended to specify a set of expunging
> > files which are stored in each test/* subdirectory.  As described in
> > the commit description for 0b1e8abd4, in order to exclude the test
> > generic/280, the -X option is used as follows:
> > 
> >     $ cat tests/generic/3.0-stable-avoid
> >     280
> >     $ sudo ./check -X 3.0-stable-avoid generic/280
> > 
> > However, it is sometimes useful to store the set of expunged tests in
> > a single file, outside of tests/* subdirectories.  This commit enables
> > the following:
> > 
> >     $ cat /root/conf/data_journal.exclude
> >     generic/068
> >     ext4/301
> >     $ sudo ./check -E /root/conf/data_journal.exclude -g auto
> > 
> > Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> 
> Looks good.
> 
> Reviewed-by: Dave Chinner <dchinner@redhat.com>

This patch has apparently not hit the xfstests repository.  Would you
like me to resend it?

Thanks,

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dave Chinner - May 12, 2014, 10 p.m.
On Mon, May 12, 2014 at 08:42:32AM -0400, Theodore Ts'o wrote:
> On Wed, Apr 16, 2014 at 04:40:18PM +1000, Dave Chinner wrote:
> > On Wed, Apr 16, 2014 at 12:58:22AM -0400, Theodore Ts'o wrote:
> > > Currently the -X option is intended to specify a set of expunging
> > > files which are stored in each test/* subdirectory.  As described in
> > > the commit description for 0b1e8abd4, in order to exclude the test
> > > generic/280, the -X option is used as follows:
> > > 
> > >     $ cat tests/generic/3.0-stable-avoid
> > >     280
> > >     $ sudo ./check -X 3.0-stable-avoid generic/280
> > > 
> > > However, it is sometimes useful to store the set of expunged tests in
> > > a single file, outside of tests/* subdirectories.  This commit enables
> > > the following:
> > > 
> > >     $ cat /root/conf/data_journal.exclude
> > >     generic/068
> > >     ext4/301
> > >     $ sudo ./check -E /root/conf/data_journal.exclude -g auto
> > > 
> > > Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> > 
> > Looks good.
> > 
> > Reviewed-by: Dave Chinner <dchinner@redhat.com>
> 
> This patch has apparently not hit the xfstests repository.  Would you
> like me to resend it?

No, I just haven't done an xfstests update for the past couple of
weeks because there haven't been a lot of patches and I've been busy
with other stuff. I'll do one later in the week.

Cheers,

Dave.

Patch

diff --git a/check b/check
index e7ace63..b1eaed2 100755
--- a/check
+++ b/check
@@ -81,6 +81,7 @@  testlist options
     -g group[,group...]	include tests from these groups
     -x group[,group...]	exclude tests from these groups
     -X file		exclude individual tests
+    -E external_file	exclude individual tests
     [testlist]		include tests matching names in testlist
 '
 	    exit 0
@@ -222,6 +223,11 @@  while [ $# -gt 0 ]; do
 			done
 		done
 		;;
+	-E)	xfile=$2; shift ;
+		if [ -f $xfile ]; then
+			cat "$xfile" >> $tmp.xlist
+	        fi
+		;;
 	-s)	RUN_SECTION="$RUN_SECTION $2"; shift ;;
 	-l)	diff="diff" ;;
 	-udiff)	diff="$diff -u" ;;