Skip to contentSkip to conversation

cr_tests: fix syscall numbers for powerpc

PATCH In review Nathan Lynch 2 participants 3 messages Dec 5, 2009 – Dec 9, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cr_tests: fix syscall numbers for powerpc

Update to the values for ckpt-v19-rc2, and add eclone.

---
 cr.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
cr.h +6 -2
index a58c2e4..8acd750 100644
@@ -71,12 +71,16 @@
 /* parisc unsupported. */
 #if __powerpc__
 
+#ifndef __NR_eclone
+#define __NR_eclone 323
+#endif
+
 #ifndef __NR_checkpoint
-#define __NR_checkpoint 323
+#define __NR_checkpoint 324
 #endif
 
 #ifndef __NR_restart
-#define __NR_restart 324
+#define __NR_restart 325
 #endif
 
 #elif __s390x__
Signature · 1 line
1.6.0.6

A message that is not in the archive (sent off-list or not yet received): 1259983334-25854-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 1/1 cr_tests: attempt all tests

Bailing at the first failure in runall.sh inhibits good test coverage.

Attempt to run all tests and keep running counts of tests passed and attempted.

---
 runall.sh |   60 ++++++++++++++++++++++++------------------------------------
 1 files changed, 24 insertions(+), 36 deletions(-)
runall.sh +24 -36
index 11e8fab..d15dc25 100644
@@ -2,6 +2,20 @@
 # Copyright 2009 IBM Corp.
 # Author: Serge Hallyn
 
+declare -i total=0
+declare -i passed=0
+
+# $1 = status
+update_totals() {
+    local status=$1
+    total+=1
+    if [ $status -eq 0 ] ; then
+	passed+=1
+    else
+	echo FAIL
+    fi
+}
+
 which checkpoint > /dev/null 2>&1
 if [ $? -ne 0 ]; then
 	echo Please place ckpt from user-cr in your PATH
@@ -32,82 +46,56 @@ fi
 echo Running simple checkpoint/restart test
 pushd simple
 bash runtests.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 1
-fi
+update_totals $?
 popd
 
 echo Running counterloop tests
 pushd counterloop
 bash runtests.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 2
-fi
+update_totals $?
 popd
 
 echo Running fileio test
 pushd fileio
 bash runtests.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 3
-fi
+update_totals $?
 popd
 
 echo Running futex tests
 pushd futex
 bash run.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 8
-fi
+update_totals $?
 popd
 
 echo Running restart block test
 pushd sleep
 bash runtest.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 6
-fi
+update_totals $?
 popd
 
 echo Running process-tree tests
 pushd process-tree
 sh runtests.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 7
-fi
+update_totals $?
 popd
 
 echo Running bash test
 pushd bashckpt
 bash bash-cr.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 5
-fi
+update_totals $?
 popd
 
 echo Running ipc tests
 pushd ipc
 bash runtests.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 6
-fi
+update_totals $?
 popd
 
 echo Running userid/namespace test
 pushd userns
 bash runtests.sh
-if [ $? -ne 0 ]; then
-	echo FAIL
-	exit 4
-fi
+update_totals $?
 popd
 
+echo $passed out of $total test groups passed.
 exit 0
Signature · 1 line
1.6.0.6
#3 lore raw
In reply to a message not in the archive
Quoted 1 line · Nathan Lynch

Update to the values for ckpt-v19-rc2, and add eclone.

Thanks, both applied.

Quoted 29 lines
---
 cr.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
cr.h +6 -2
index a58c2e4..8acd750 100644
@@ -71,12 +71,16 @@
 /* parisc unsupported. */
 #if __powerpc__
 
+#ifndef __NR_eclone
+#define __NR_eclone 323
+#endif
+
 #ifndef __NR_checkpoint
-#define __NR_checkpoint 323
+#define __NR_checkpoint 324
 #endif
 
 #ifndef __NR_restart
-#define __NR_restart 324
+#define __NR_restart 325
 #endif
 
 #elif __s390x__
Signature · 1 line
1.6.0.6