linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fstests: make check actually honor expunged list
@ 2023-07-21 19:48 Josef Bacik
  2023-07-21 20:04 ` Josef Bacik
  0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2023-07-21 19:48 UTC (permalink / raw)
  To: linux-btrfs, fstests

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@toxicpanda.com>
---
 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


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

end of thread, other threads:[~2023-07-21 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 19:48 [PATCH] fstests: make check actually honor expunged list Josef Bacik
2023-07-21 20:04 ` Josef Bacik

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).