From patchwork Mon Dec 17 10:57:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [9/9, FWTS-TEST] klog-0002: Add in the old dmesg_common tests into a new klog test Date: Mon, 17 Dec 2012 00:57:16 -0000 From: Colin King X-Patchwork-Id: 206822 Message-Id: <1355741836-31729-10-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com From: Colin Ian King The fwts dmesg_common test was removed and moved into klog, so add the original dmesg_common tests into a new klog test to check for these few messages. Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Ivan Hu --- klog-0002/klog-0001.log | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ klog-0002/klog-0002.log | 34 +++++++++++++++++++++ klog-0002/klog-0003.log | 1 + klog-0002/klog.txt | 11 +++++++ klog-0002/test-0001.sh | 17 +++++++++++ klog-0002/test-0002.sh | 17 +++++++++++ klog-0002/test-0003.sh | 17 +++++++++++ klog-0002/testcase.txt | 1 + 8 files changed, 179 insertions(+) create mode 100644 klog-0002/klog-0001.log create mode 100644 klog-0002/klog-0002.log create mode 100644 klog-0002/klog-0003.log create mode 100644 klog-0002/klog.txt create mode 100755 klog-0002/test-0001.sh create mode 100755 klog-0002/test-0002.sh create mode 100755 klog-0002/test-0003.sh create mode 100644 klog-0002/testcase.txt diff --git a/klog-0002/klog-0001.log b/klog-0002/klog-0001.log new file mode 100644 index 0000000..38d6e53 --- /dev/null +++ b/klog-0002/klog-0001.log @@ -0,0 +1,81 @@ +klog Scan kernel log for errors and warnings. +klog ---------------------------------------------------------- +klog Test 1 of 1: Kernel log error check. +klog FAILED [CRITICAL] CommonThermalOverrun: Test 1, CRITICAL +klog Kernel message: [ 0.408874] CPU1: Temperature above +klog threshold, cpu clock throttled (total events = 1) +klog +klog ADVICE: Test caused CPU temperature above critical +klog threshold. Insufficient cooling? +klog +klog FAILED [CRITICAL] CommonBiosIrqRoutingBug: Test 1, +klog CRITICAL Kernel message: [ 0.728985] Disabling IRQ #15 +klog +klog ADVICE: The kernel detected an irq storm. This is most +klog probably an IRQ routing bug. +klog +klog FAILED [CRITICAL] CommonBiosIrqRoutingBug: Test 1, +klog CRITICAL Kernel message: [ 0.734767] Disabling IRQ #11 +klog +klog ADVICE: The kernel detected an irq storm. This is most +klog probably an IRQ routing bug. +klog +klog FAILED [CRITICAL] CommonThermalOverrun: Test 1, CRITICAL +klog Kernel message: [ 0.768555] CPU3: Temperature above +klog threshold, cpu clock throttled (total events = 1) +klog +klog ADVICE: Test caused CPU temperature above critical +klog threshold. Insufficient cooling? +klog +klog FAILED [CRITICAL] CommonThermalOverrun: Test 1, CRITICAL +klog Kernel message: [ 1.128275] CPU5: Temperature above +klog threshold, cpu clock throttled (total events = 1) +klog +klog ADVICE: Test caused CPU temperature above critical +klog threshold. Insufficient cooling? +klog +klog FAILED [CRITICAL] CommonThermalOverrun: Test 1, CRITICAL +klog Kernel message: [ 1.487778] CPU7: Temperature above +klog threshold, cpu clock throttled (total events = 1) +klog +klog ADVICE: Test caused CPU temperature above critical +klog threshold. Insufficient cooling? +klog +klog FAILED [CRITICAL] CommonBiosIrqRoutingBug: Test 1, +klog CRITICAL Kernel message: [ 2.131632] Disabling IRQ #16 +klog +klog ADVICE: The kernel detected an irq storm. This is most +klog probably an IRQ routing bug. +klog +klog FAILED [CRITICAL] CommonBiosIrqRoutingBug: Test 1, +klog CRITICAL Kernel message: [ 3.220411] Disabling IRQ #18 +klog +klog ADVICE: The kernel detected an irq storm. This is most +klog probably an IRQ routing bug. +klog +klog FAILED [CRITICAL] CommonThermalOverrun: Test 1, CRITICAL +klog Kernel message: [ 10.027255] CPU0: Temperature above +klog threshold, cpu clock throttled (total events = 1) +klog +klog ADVICE: Test caused CPU temperature above critical +klog threshold. Insufficient cooling? +klog +klog FAILED [CRITICAL] CommonThermalOverrun: Test 1, CRITICAL +klog Kernel message: [ 11.592319] CPU1: Temperature above +klog threshold, cpu clock throttled (total events = 2) +klog +klog ADVICE: Test caused CPU temperature above critical +klog threshold. Insufficient cooling? +klog +klog FAILED [CRITICAL] CommonBiosIrqRoutingBug: Test 1, +klog CRITICAL Kernel message: [ 17.353310] Disabling IRQ #10 +klog +klog ADVICE: The kernel detected an irq storm. This is most +klog probably an IRQ routing bug. +klog +klog Found 11 unique errors in kernel log. +klog +klog ========================================================== +klog 0 passed, 11 failed, 0 warnings, 0 aborted, 0 skipped, 0 +klog info only. +klog ========================================================== diff --git a/klog-0002/klog-0002.log b/klog-0002/klog-0002.log new file mode 100644 index 0000000..e827cac --- /dev/null +++ b/klog-0002/klog-0002.log @@ -0,0 +1,34 @@ +summary +summary 0 passed, 11 failed, 0 warnings, 0 aborted, 0 skipped, 0 +summary info only. +summary +summary Test Failure Summary +summary ========================================================== +summary +summary Critical failures: 11 +summary klog: CRITICAL Kernel message: [ 0.408874] CPU1: Temperature above threshold, cpu clock throttled (total events = 1) +summary klog: CRITICAL Kernel message: [ 0.728985] Disabling IRQ #15 +summary klog: CRITICAL Kernel message: [ 0.734767] Disabling IRQ #11 +summary klog: CRITICAL Kernel message: [ 0.768555] CPU3: Temperature above threshold, cpu clock throttled (total events = 1) +summary klog: CRITICAL Kernel message: [ 1.128275] CPU5: Temperature above threshold, cpu clock throttled (total events = 1) +summary klog: CRITICAL Kernel message: [ 1.487778] CPU7: Temperature above threshold, cpu clock throttled (total events = 1) +summary klog: CRITICAL Kernel message: [ 2.131632] Disabling IRQ #16 +summary klog: CRITICAL Kernel message: [ 3.220411] Disabling IRQ #18 +summary klog: CRITICAL Kernel message: [ 10.027255] CPU0: Temperature above threshold, cpu clock throttled (total events = 1) +summary klog: CRITICAL Kernel message: [ 11.592319] CPU1: Temperature above threshold, cpu clock throttled (total events = 2) +summary klog: CRITICAL Kernel message: [ 17.353310] Disabling IRQ #10 +summary +summary High failures: NONE +summary +summary Medium failures: NONE +summary +summary Low failures: NONE +summary +summary Other failures: NONE +summary +summary Test |Pass |Fail |Abort|Warn |Skip |Info | +summary ---------------+-----+-----+-----+-----+-----+-----+ +summary klog | | 11| | | | | +summary ---------------+-----+-----+-----+-----+-----+-----+ +summary Total: | 0| 11| 0| 0| 0| 0| +summary ---------------+-----+-----+-----+-----+-----+-----+ diff --git a/klog-0002/klog-0003.log b/klog-0002/klog-0003.log new file mode 100644 index 0000000..f88577b --- /dev/null +++ b/klog-0002/klog-0003.log @@ -0,0 +1 @@ +klog Found 11 unique errors in kernel log. diff --git a/klog-0002/klog.txt b/klog-0002/klog.txt new file mode 100644 index 0000000..cc9685d --- /dev/null +++ b/klog-0002/klog.txt @@ -0,0 +1,11 @@ +[ 0.408874] CPU1: Temperature above threshold, cpu clock throttled (total events = 1) +[ 0.728985] Disabling IRQ #15 +[ 0.734767] Disabling IRQ #11 +[ 0.768555] CPU3: Temperature above threshold, cpu clock throttled (total events = 1) +[ 1.128275] CPU5: Temperature above threshold, cpu clock throttled (total events = 1) +[ 1.487778] CPU7: Temperature above threshold, cpu clock throttled (total events = 1) +[ 2.131632] Disabling IRQ #16 +[ 3.220411] Disabling IRQ #18 +[ 10.027255] CPU0: Temperature above threshold, cpu clock throttled (total events = 1) +[ 11.592319] CPU1: Temperature above threshold, cpu clock throttled (total events = 2) +[ 17.353310] Disabling IRQ #10 diff --git a/klog-0002/test-0001.sh b/klog-0002/test-0001.sh new file mode 100755 index 0000000..134c60d --- /dev/null +++ b/klog-0002/test-0001.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test klog against known common failure patterns (was the dmesg_common test)" +NAME=test-0001.sh +TMPLOG=$TMP/klog.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --klog=klog.txt klog - | grep "^[0-9]*[ ]*klog" | cut -c7- > $TMPLOG +diff $TMPLOG klog-0001.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret diff --git a/klog-0002/test-0002.sh b/klog-0002/test-0002.sh new file mode 100755 index 0000000..9f057a4 --- /dev/null +++ b/klog-0002/test-0002.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test klog against known common failure patterns (was the dmesg_common test)" +NAME=test-0002.sh +TMPLOG=$TMP/klog.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --klog=klog.txt klog - | grep summary | sed 's/line: [0-9]*//' | cut -c7- > $TMPLOG +grep -v "log line:" klog-0002.log | diff $TMPLOG - >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret diff --git a/klog-0002/test-0003.sh b/klog-0002/test-0003.sh new file mode 100755 index 0000000..3588d29 --- /dev/null +++ b/klog-0002/test-0003.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test klog against known common failure patterns (was the dmesg_common test)" +NAME=test-0003.sh +TMPLOG=$TMP/klog.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --klog=klog.txt klog - | grep "errors in kernel log" | grep "Found" | cut -c7- > $TMPLOG +diff $TMPLOG klog-0003.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret diff --git a/klog-0002/testcase.txt b/klog-0002/testcase.txt new file mode 100644 index 0000000..c6aaaf2 --- /dev/null +++ b/klog-0002/testcase.txt @@ -0,0 +1 @@ +Test klog against known common failure patterns (was the dmesg_common test)