[PATCH] fstests: make check actually honor expunged list

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



The patch 60054d51 ("check: fix excluded tests are only expunged in the
first iteration") messed up the logic, if _function will be true if it
gets 1, so the _expunge_test return values are inverted.  Also it
appears bash swallows the output in this calling convention, so you
don't get the 'expunged' output.  I noticed this when my CI system
stopped honoring my exclude list, this makes everything work properly
again.

Fixes: 60054d51 ("check: fix excluded tests are only expunged in the first iteration")
Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
---
 check | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/check b/check
index c8593252..b731af74 100755
--- a/check
+++ b/check
@@ -570,11 +570,10 @@ _expunge_test()
 
 	for f in "${exclude_tests[@]}"; do
 		if [ "${TEST_ID}" == "$f" ]; then
-			echo "       [expunged]"
-			return 0
+			return 1
 		fi
 	done
-	return 1
+	return 0
 }
 
 # retain files which would be overwritten in subsequent reruns of the same test
@@ -870,6 +869,7 @@ function run_section()
 
 		if $showme; then
 			if _expunge_test $seqnum; then
+				echo "       [expunged]"
 				tc_status="expunge"
 			else
 				echo
@@ -896,6 +896,7 @@ function run_section()
 
 		# check if we really should run it
 		if _expunge_test $seqnum; then
+			echo "       [expunged]"
 			tc_status="expunge"
 			_stash_test_status "$seqnum" "$tc_status"
 			continue
-- 
2.41.0




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux