From: Andi Kleen <ak@linux.intel.com>
To: cpw@sgi.com
Subject: [PATCH 4/8] Run full test suite before exiting
Date: Wed, 14 Dec 2011 11:38:34 -0800

Show all the problems before exiting in regress1.
---
 test/regress |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Index: numactl-dev/test/regress
===================================================================
--- numactl-dev.orig/test/regress
+++ numactl-dev/test/regress
@@ -26,6 +26,8 @@ DOUBLEPAGES=$[ $PAGES * 2 ]
 DOUBLEPAGES=$[ $DOUBLEPAGES - 200 ]
 NEEDPAGES=$[ $DOUBLEPAGES + $DOUBLEPAGES / 5 ] # 20% spare
 
+EXIT=0
+
 declare -i maxnode
 declare -a node
 
@@ -37,7 +39,7 @@ numactl() {
 failed() {
     echo '=======FAILED'
     echo "Check if machine doesn't have background jobs and try again"
-    exit 1
+    EXIT=1
 }
 
 # nstat statname node
@@ -203,7 +205,12 @@ main()
 	diff -u A B
 	rm A B
 
-	echo '========SUCCESS'
+	if [ "$EXIT" = 0 ] ; then
+		echo '========SUCCESS'
+	else
+		echo '========FAILURE'
+		exit 1
+	fi
 }
 
 # =========================================================================
