linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] fstests: move expunge test into a helper
@ 2018-01-21  7:24 Luis R. Rodriguez
  2018-01-21  7:24 ` [PATCH 2/2] fstests: expunge tests when doing a dry run Luis R. Rodriguez
  0 siblings, 1 reply; 2+ messages in thread
From: Luis R. Rodriguez @ 2018-01-21  7:24 UTC (permalink / raw)
  To: fstests; +Cc: linux-xfs, linux-kernel, Luis R. Rodriguez

Move the expunge test into a helper.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 check | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/check b/check
index f8db3cd6dfab..0ba71d5d2005 100755
--- a/check
+++ b/check
@@ -485,6 +485,18 @@ _check_filesystems()
 	fi
 }
 
+_expunge_test()
+{
+	TEST_ID="$1"
+	if [ -s $tmp.xlist ]; then
+		if grep $TEST_ID $tmp.xlist > /dev/null 2>&1 ; then
+			echo "       [expunged]"
+			return 1
+		fi
+	fi
+	return 0
+}
+
 _prepare_test_list
 
 if $OPTIONS_HAVE_SECTIONS; then
@@ -672,11 +684,9 @@ for section in $HOST_OPTIONS_SECTIONS; do
 		rm -f $seqres.out.bad
 
 		# check if we really should run it
-		if [ -s $tmp.xlist ]; then
-			if grep $seqnum $tmp.xlist > /dev/null 2>&1 ; then
-				echo "       [expunged]"
-				continue
-			fi
+		_expunge_test $seqnum
+		if [ $? -eq 1 ]; then
+			continue
 		fi
 
 		# slashes now in names, sed barfs on them so use grep
-- 
2.15.0

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

* [PATCH 2/2] fstests: expunge tests when doing a dry run
  2018-01-21  7:24 [PATCH 1/2] fstests: move expunge test into a helper Luis R. Rodriguez
@ 2018-01-21  7:24 ` Luis R. Rodriguez
  0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2018-01-21  7:24 UTC (permalink / raw)
  To: fstests; +Cc: linux-xfs, linux-kernel, Luis R. Rodriguez

Running ./check with -n will not execute tests, however
when exclude files are used we still show them as if
they are run. Test the exclude file prior to assuming
we can run a test on a dry run.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 check | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/check b/check
index 0ba71d5d2005..43b8d6c3d127 100755
--- a/check
+++ b/check
@@ -666,6 +666,10 @@ for section in $HOST_OPTIONS_SECTIONS; do
 	    echo -n "$seqnum"
 
 	    if $showme; then
+		_expunge_test $seqnum
+		if [ $? -eq 1 ]; then
+			continue
+		fi
 		echo
 		start=0
 		stop=0
-- 
2.15.0

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

end of thread, other threads:[~2018-01-21  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-21  7:24 [PATCH 1/2] fstests: move expunge test into a helper Luis R. Rodriguez
2018-01-21  7:24 ` [PATCH 2/2] fstests: expunge tests when doing a dry run Luis R. Rodriguez

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