* [PATCH] check: add support for an external test expunging file
@ 2014-04-15 2:52 Theodore Ts'o
2014-04-16 0:15 ` Dave Chinner
0 siblings, 1 reply; 8+ messages in thread
From: Theodore Ts'o @ 2014-04-15 2:52 UTC (permalink / raw)
To: xfs; +Cc: Ext4 Developers List, Theodore Ts'o
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 allows
the following:
$ cat /root/conf/data_journal.exclude
generic/068
ext4/301
$ sudo ./check -X /root/conf/data_journal.exclude -g auto
If the argument to the -X option is a pathname (that is, includes a
'/' character), treat it as the latter case. If it the argument to
the -X option is just a bare filename (that is, does not include '/'
character), treat it as the former.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
check | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/check b/check
index e7ace63..791a386 100755
--- a/check
+++ b/check
@@ -215,12 +215,22 @@ while [ $# -gt 0 ]; do
;;
-X) xfile=$2; shift ;
- for d in $SRC_GROUPS $FSTYP; do
- [ -f $SRC_DIR/$d/$xfile ] || continue
- for f in `cat $SRC_DIR/$d/$xfile`; do
- echo $d/$f >> $tmp.xlist
+ case "$xfile" in
+ */*) if [ -f "$xfile" ]; then
+ cat "$xfile" >> $tmp.xlist
+ else
+ echo "Exclusion file $xfile not found"
+ exit 1
+ fi
+ ;;
+ *) for d in $SRC_GROUPS $FSTYP; do
+ [ -f $SRC_DIR/$d/$xfile ] || continue
+ for f in `cat $SRC_DIR/$d/$xfile`; do
+ echo $d/$f >> $tmp.xlist
+ done
done
- done
+ ;;
+ esac
;;
-s) RUN_SECTION="$RUN_SECTION $2"; shift ;;
-l) diff="diff" ;;
--
1.9.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] check: add support for an external test expunging file
2014-04-15 2:52 [PATCH] check: add support for an external test expunging file Theodore Ts'o
@ 2014-04-16 0:15 ` Dave Chinner
2014-04-16 0:25 ` Theodore Ts'o
2014-04-16 4:58 ` [PATCH -v2] check: add support for an external file containing tests to exclude Theodore Ts'o
0 siblings, 2 replies; 8+ messages in thread
From: Dave Chinner @ 2014-04-16 0:15 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: xfs, Ext4 Developers List
On Mon, Apr 14, 2014 at 10:52:00PM -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 allows
> the following:
>
> $ cat /root/conf/data_journal.exclude
> generic/068
> ext4/301
> $ sudo ./check -X /root/conf/data_journal.exclude -g auto
>
> If the argument to the -X option is a pathname (that is, includes a
> '/' character), treat it as the latter case. If it the argument to
> the -X option is just a bare filename (that is, does not include '/'
> character), treat it as the former.
Can you add a new option rather than overloading the existing one
with new meanings and semantics?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] check: add support for an external test expunging file
2014-04-16 0:15 ` Dave Chinner
@ 2014-04-16 0:25 ` Theodore Ts'o
2014-04-16 0:34 ` Dave Chinner
2014-04-16 4:58 ` [PATCH -v2] check: add support for an external file containing tests to exclude Theodore Ts'o
1 sibling, 1 reply; 8+ messages in thread
From: Theodore Ts'o @ 2014-04-16 0:25 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs, Ext4 Developers List
On Wed, Apr 16, 2014 at 10:15:30AM +1000, Dave Chinner wrote:
> > If the argument to the -X option is a pathname (that is, includes a
> > '/' character), treat it as the latter case. If it the argument to
> > the -X option is just a bare filename (that is, does not include '/'
> > character), treat it as the former.
>
> Can you add a new option rather than overloading the existing one
> with new meanings and semantics?
If that's your preference, sure. How does --expunge-list-file strike
you? Or would you prefer something else? I'm easy. :-)
- Ted
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] check: add support for an external test expunging file
2014-04-16 0:25 ` Theodore Ts'o
@ 2014-04-16 0:34 ` Dave Chinner
0 siblings, 0 replies; 8+ messages in thread
From: Dave Chinner @ 2014-04-16 0:34 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: xfs, Ext4 Developers List
On Tue, Apr 15, 2014 at 08:25:50PM -0400, Theodore Ts'o wrote:
> On Wed, Apr 16, 2014 at 10:15:30AM +1000, Dave Chinner wrote:
> > > If the argument to the -X option is a pathname (that is, includes a
> > > '/' character), treat it as the latter case. If it the argument to
> > > the -X option is just a bare filename (that is, does not include '/'
> > > character), treat it as the former.
> >
> > Can you add a new option rather than overloading the existing one
> > with new meanings and semantics?
>
> If that's your preference, sure. How does --expunge-list-file strike
> you? Or would you prefer something else? I'm easy. :-)
-E/--expunge-file is fine by me.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH -v2] check: add support for an external file containing tests to exclude
2014-04-16 0:15 ` Dave Chinner
2014-04-16 0:25 ` Theodore Ts'o
@ 2014-04-16 4:58 ` Theodore Ts'o
2014-04-16 6:40 ` Dave Chinner
1 sibling, 1 reply; 8+ messages in thread
From: Theodore Ts'o @ 2014-04-16 4:58 UTC (permalink / raw)
To: xfs; +Cc: Ext4 Developers List, Theodore Ts'o
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" ;;
--
1.9.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH -v2] check: add support for an external file containing tests to exclude
2014-04-16 4:58 ` [PATCH -v2] check: add support for an external file containing tests to exclude Theodore Ts'o
@ 2014-04-16 6:40 ` Dave Chinner
2014-05-12 12:42 ` Theodore Ts'o
0 siblings, 1 reply; 8+ messages in thread
From: Dave Chinner @ 2014-04-16 6:40 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: Ext4 Developers List, xfs
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.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -v2] check: add support for an external file containing tests to exclude
2014-04-16 6:40 ` Dave Chinner
@ 2014-05-12 12:42 ` Theodore Ts'o
2014-05-12 22:00 ` Dave Chinner
0 siblings, 1 reply; 8+ messages in thread
From: Theodore Ts'o @ 2014-05-12 12:42 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs, Ext4 Developers List
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -v2] check: add support for an external file containing tests to exclude
2014-05-12 12:42 ` Theodore Ts'o
@ 2014-05-12 22:00 ` Dave Chinner
0 siblings, 0 replies; 8+ messages in thread
From: Dave Chinner @ 2014-05-12 22:00 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: xfs, Ext4 Developers List
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.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-05-12 22:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-15 2:52 [PATCH] check: add support for an external test expunging file Theodore Ts'o
2014-04-16 0:15 ` Dave Chinner
2014-04-16 0:25 ` Theodore Ts'o
2014-04-16 0:34 ` Dave Chinner
2014-04-16 4:58 ` [PATCH -v2] check: add support for an external file containing tests to exclude Theodore Ts'o
2014-04-16 6:40 ` Dave Chinner
2014-05-12 12:42 ` Theodore Ts'o
2014-05-12 22:00 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).