diff options
author | Andi Kleen <ak@linux.intel.com> | 2010-05-20 10:50:12 +0200 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-05-20 10:50:12 +0200 |
commit | 019904b37bad2af70b188cb2813cd8f10f3ecf12 (patch) | |
tree | 53350b39c8fb82a76242728a9fd237b38db85eec | |
parent | 0e8f953f6bca9c3053a3fd6ac863b152d71b0141 (diff) | |
download | mce-test-019904b37bad2af70b188cb2813cd8f10f3ecf12.tar.gz |
random_offline: give total success/failure statistics for test
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rwxr-xr-x | tsrc/random_offline | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tsrc/random_offline b/tsrc/random_offline index 919706c..adb68f7 100755 --- a/tsrc/random_offline +++ b/tsrc/random_offline @@ -75,9 +75,12 @@ unpoison() { while read i ; do #echo -n , #echo "u $i" + (( utotal++ )) if ! echo $i | sed 's/000$//' > $DEBUG/hwpoison/unpoison-pfn ; then echo "$i $?" >> unpoison-failed echo "unpoisioning $i failed: $?" + else + (( usuccess++ )) fi done < offlined echo done @@ -95,6 +98,13 @@ echo "Using random seed $SEED" start=$(date +%s) failed=0 ufailed=0 +success=0 +usuccess=0 +total=0 +utotal=0 + +cbefore=$(grep HardwareCorrupted /proc/meminfo) + (( k = 0 )) rm -f offlined unpoison-failed @@ -105,8 +115,10 @@ while true ; do echo 0x$X ) #echo "p $T" + (( total++ )) if echo 2>/dev/null $T >/sys/devices/system/memory/soft_offline_page ; then echo $T >> offlined + (( success++ )) else #echo offlining $T failed $? (( failed++ )) @@ -131,8 +143,11 @@ done if [ -f unpoison-failed ] ; then ufailed=$(wc -l unpoison-failed | awk ' {print $1}') fi -echo "soft-poison-failed: $failed" -echo "unpoison-failed: $ufailed" +echo "soft-poison: success $success failed $failed of total $total" +echo "unpoison-failed: success $usuccess failed $ufailed of total $utotal" +echo "poisoned before: $cbefore" +echo -n "poisoned after: " +grep HardwareCorrupted /proc/meminfo ### xxx automatic success/failure criteria? |