[PATCH 27/27] dmesg_common-0001: fix tests to work with new fwts logging

Colin King colin.king at canonical.com
Wed May 16 13:20:58 UTC 2012


From: Colin Ian King <colin.king at canonical.com>

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 dmesg_common-0001/dmesg_common-0001.log |    6 +++---
 dmesg_common-0001/dmesg_common-0002.log |   35 +++++++++++--------------------
 dmesg_common-0001/test-0001.sh          |    2 +-
 dmesg_common-0001/test-0002.sh          |    2 +-
 dmesg_common-0001/test-0003.sh          |    2 +-
 5 files changed, 18 insertions(+), 29 deletions(-)

diff --git a/dmesg_common-0001/dmesg_common-0001.log b/dmesg_common-0001/dmesg_common-0001.log
index 5dafd09..22e05d9 100644
--- a/dmesg_common-0001/dmesg_common-0001.log
+++ b/dmesg_common-0001/dmesg_common-0001.log
@@ -1,5 +1,5 @@
 dmesg_common    General dmesg common errors check.
-dmesg_common    ---------------------------------------------------------
+dmesg_common    ----------------------------------------------------------
 dmesg_common    Test 1 of 1: Check common errors in kernel log.
 dmesg_common    FAILED [CRITICAL] KlogTemperatureAboveThresholdCpu: Test 1
 dmesg_common    , CRITICAL Kernel message: [ 0.408874] CPU1: Temperature
@@ -75,7 +75,7 @@ dmesg_common    probably an IRQ routing bug.
 dmesg_common    
 dmesg_common    Found 11 errors in kernel log
 dmesg_common    
-dmesg_common    =========================================================
+dmesg_common    ==========================================================
 dmesg_common    0 passed, 11 failed, 0 warnings, 0 aborted, 0 skipped, 0
 dmesg_common    info only.
-dmesg_common    =========================================================
+dmesg_common    ==========================================================
diff --git a/dmesg_common-0001/dmesg_common-0002.log b/dmesg_common-0001/dmesg_common-0002.log
index b24dc41..da46c45 100644
--- a/dmesg_common-0001/dmesg_common-0002.log
+++ b/dmesg_common-0001/dmesg_common-0002.log
@@ -3,31 +3,20 @@ summary         0 passed, 11 failed, 0 warnings, 0 aborted, 0 skipped, 0
 summary         info only.
 summary         
 summary         Test Failure Summary
-summary         ====================
+summary         ==========================================================
 summary         
 summary         Critical failures: 11
-summary          dmesg_common test, at 1 log line: 16
-summary           "CRITICAL Kernel message: [ 0.408874] CPU1: Temperature above threshold, cpu clock throttled (total events = 1)"
-summary          dmesg_common test, at 1 log line: 23
-summary           "CRITICAL Kernel message: [ 0.728985] Disabling IRQ #15"
-summary          dmesg_common test, at 1 log line: 29
-summary           "CRITICAL Kernel message: [ 0.734767] Disabling IRQ #11"
-summary          dmesg_common test, at 1 log line: 35
-summary           "CRITICAL Kernel message: [ 0.768555] CPU3: Temperature above threshold, cpu clock throttled (total events = 1)"
-summary          dmesg_common test, at 1 log line: 42
-summary           "CRITICAL Kernel message: [ 1.128275] CPU5: Temperature above threshold, cpu clock throttled (total events = 1)"
-summary          dmesg_common test, at 1 log line: 49
-summary           "CRITICAL Kernel message: [ 1.487778] CPU7: Temperature above threshold, cpu clock throttled (total events = 1)"
-summary          dmesg_common test, at 1 log line: 56
-summary           "CRITICAL Kernel message: [ 2.131632] Disabling IRQ #16"
-summary          dmesg_common test, at 1 log line: 62
-summary           "CRITICAL Kernel message: [ 3.220411] Disabling IRQ #18"
-summary          dmesg_common test, at 1 log line: 68
-summary           "CRITICAL Kernel message: [ 10.027255] CPU0: Temperature above threshold, cpu clock throttled (total events = 1)"
-summary          dmesg_common test, at 1 log line: 75
-summary           "CRITICAL Kernel message: [ 11.592319] CPU1: Temperature above threshold, cpu clock throttled (total events = 2)"
-summary          dmesg_common test, at 1 log line: 82
-summary           "CRITICAL Kernel message: [ 17.353310] Disabling IRQ #10"
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 0.408874] CPU1: Temperature above threshold, cpu clock throttled (total events = 1)
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 0.728985] Disabling IRQ #15
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 0.734767] Disabling IRQ #11
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 0.768555] CPU3: Temperature above threshold, cpu clock throttled (total events = 1)
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 1.128275] CPU5: Temperature above threshold, cpu clock throttled (total events = 1)
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 1.487778] CPU7: Temperature above threshold, cpu clock throttled (total events = 1)
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 2.131632] Disabling IRQ #16
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 3.220411] Disabling IRQ #18
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 10.027255] CPU0: Temperature above threshold, cpu clock throttled (total events = 1)
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 11.592319] CPU1: Temperature above threshold, cpu clock throttled (total events = 2)
+summary          dmesg_common test, at 1 log : CRITICAL Kernel message: [ 17.353310] Disabling IRQ #10
 summary         
 summary         High failures: NONE
 summary         
diff --git a/dmesg_common-0001/test-0001.sh b/dmesg_common-0001/test-0001.sh
index 57d3831..7f18c5c 100755
--- a/dmesg_common-0001/test-0001.sh
+++ b/dmesg_common-0001/test-0001.sh
@@ -4,7 +4,7 @@ TEST="Test dmesg_common against known failure patterns"
 NAME=test-0001.sh
 TMPLOG=$TMP/dmesg_common.log.$$
 
-$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep "^[0-9]*[ ]*dmesg_common" | cut -c7- > $TMPLOG
+$FWTS --log-format="%line %owner " -w 80 --klog=dmesg_common.txt dmesg_common - | grep "^[0-9]*[ ]*dmesg_common" | cut -c7- > $TMPLOG
 diff $TMPLOG dmesg_common-0001.log >> $FAILURE_LOG
 ret=$?
 if [ $ret -eq 0 ]; then 
diff --git a/dmesg_common-0001/test-0002.sh b/dmesg_common-0001/test-0002.sh
index b32245c..ac1737d 100755
--- a/dmesg_common-0001/test-0002.sh
+++ b/dmesg_common-0001/test-0002.sh
@@ -4,7 +4,7 @@ TEST="Test dmesg_common summary table against known failure patterns"
 NAME=test-0002.sh
 TMPLOG=$TMP/dmesg_common.log.$$
 
-$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep summary | grep -v "log line:" | cut -c7-  > $TMPLOG
+$FWTS --log-format="%line %owner " -w 80 --klog=dmesg_common.txt dmesg_common - | grep summary | sed 's/line: [0-9]*//' | cut -c7-  > $TMPLOG
 grep -v "log line:" dmesg_common-0002.log | diff $TMPLOG - >> $FAILURE_LOG
 ret=$?
 if [ $ret -eq 0 ]; then 
diff --git a/dmesg_common-0001/test-0003.sh b/dmesg_common-0001/test-0003.sh
index 3a06405..09680fd 100755
--- a/dmesg_common-0001/test-0003.sh
+++ b/dmesg_common-0001/test-0003.sh
@@ -4,7 +4,7 @@ TEST="Test dmesg_common against known failure rate"
 NAME=test-0003.sh
 TMPLOG=$TMP/dmesg_common.log.$$
 
-$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep "errors in kernel log" | grep "Found" | cut -c7- > $TMPLOG
+$FWTS --log-format="%line %owner " -w 80 --klog=dmesg_common.txt dmesg_common - | grep "errors in kernel log" | grep "Found" | cut -c7- > $TMPLOG
 diff $TMPLOG dmesg_common-0003.log >> $FAILURE_LOG
 ret=$?
 if [ $ret -eq 0 ]; then 
-- 
1.7.10





More information about the fwts-devel mailing list