All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] common: fix excluding test groups
@ 2016-12-08 13:34 Amir Goldstein
  2016-12-09  4:16 ` Eryu Guan
  2016-12-09  5:40 ` Dave Chinner
  0 siblings, 2 replies; 7+ messages in thread
From: Amir Goldstein @ 2016-12-08 13:34 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Dave Chinner, fstests

The -x flag is used to exclude tests that belong to
certain groups from the test args list.

When the test args list is expressed as a match pattern,
-x fails to exclude the tests that match the pattern
and belong to excluded groups.

For example:
$ ./check -n -x xfs/??? | wc -l
341
$ ./check -n -x fuzzers,dangerous_fuzzers xfs/??? | wc -l
341

After the fix:
$ ./check -n -x fuzzers,dangerous_fuzzers xfs/??? | wc -l
315

This bug seems to date back to this git repo epoc.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 check | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/check b/check
index 8f2a1bb..9732460 100755
--- a/check
+++ b/check
@@ -158,11 +158,14 @@ _timestamp()
 _prepare_test_list()
 {
 	unset list
+	touch $tmp.list
 	# Tests specified on the command line
 	if [ -s $tmp.arglist ]; then
-		cat $tmp.arglist > $tmp.list
-	else
-		touch $tmp.list
+		# flatten multi tests line (tests/$fs/???) to 1 test per line
+		list=$(cat $tmp.arglist)
+		for t in $list; do
+			echo "$t" >> $tmp.list
+		done
 	fi
 
 	# Specified groups to include
-- 
2.7.4


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

end of thread, other threads:[~2016-12-09  7:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 13:34 [PATCH] common: fix excluding test groups Amir Goldstein
2016-12-09  4:16 ` Eryu Guan
2016-12-09  4:57   ` Amir Goldstein
2016-12-09  5:35     ` Amir Goldstein
2016-12-09  5:52       ` Eryu Guan
2016-12-09  5:40 ` Dave Chinner
2016-12-09  7:51   ` Amir Goldstein

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.