[PATCH 1/2] fstests: move expunge test into a helper

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

 



Move the expunge test into a helper.

Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux