Patchwork [24/27] oops-0001: fix tests to work with new fwts logging

login
register
mail settings
Submitter Colin King
Date May 16, 2012, 1:20 p.m.
Message ID <1337174459-21597-25-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/159669/
State Accepted
Headers show

Comments

Colin King - May 16, 2012, 1:20 p.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 oops-0001/oops-0002.log |    8 +++-----
 oops-0001/test-0002.sh  |    2 +-
 oops-0001/test-0003.sh  |    2 +-
 3 files changed, 5 insertions(+), 7 deletions(-)
Keng-Yu Lin - May 23, 2012, 6:57 a.m.
On Wed, May 16, 2012 at 9:20 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  oops-0001/oops-0002.log |    8 +++-----
>  oops-0001/test-0002.sh  |    2 +-
>  oops-0001/test-0003.sh  |    2 +-
>  3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/oops-0001/oops-0002.log b/oops-0001/oops-0002.log
> index c37f96d..3b18f01 100644
> --- a/oops-0001/oops-0002.log
> +++ b/oops-0001/oops-0002.log
> @@ -1,13 +1,11 @@
>  summary
> -summary         0 passed, 1 failed, 0 warnings, 0 aborted, 0 skipped, 0
> -summary         info only.
> +summary         0 passed, 1 failed, 0 warnings, 0 aborted, 0 skipped, 0 info only.
>  summary
>  summary         Test Failure Summary
> -summary         ====================
> +summary         ==========================================================================================================================================================================================================================================================================================================================================================================================
>  summary
>  summary         Critical failures: 1
> -summary          oops test, at 1 log line: 1527
> -summary           "Found 36 oopses in kernel log."
> +summary          oops test, at 1 log : Found 36 oopses in kernel log.
>  summary
>  summary         High failures: NONE
>  summary
> diff --git a/oops-0001/test-0002.sh b/oops-0001/test-0002.sh
> index eb43148..9b5e1bc 100755
> --- a/oops-0001/test-0002.sh
> +++ b/oops-0001/test-0002.sh
> @@ -4,7 +4,7 @@ TEST="Test oops summary table against known failure patterns"
>  NAME=test-0002.sh
>  TMPLOG=$TMP/oops.log.$$
>
> -$FWTS -w 80 --klog=oops.txt oops - | grep summary | grep -v "log line:" | cut -c7- > $TMPLOG
> +$FWTS --log-format="%line %owner " -w 400 --klog=oops.txt oops - | grep summary | sed 's/line: [0-9]*//' | cut -c7- > $TMPLOG
>  grep -v "log line:" oops-0002.log | diff $TMPLOG - >> $FAILURE_LOG
>  ret=$?
>  if [ $ret -eq 0 ]; then
> diff --git a/oops-0001/test-0003.sh b/oops-0001/test-0003.sh
> index 240fb4d..8efb02d 100755
> --- a/oops-0001/test-0003.sh
> +++ b/oops-0001/test-0003.sh
> @@ -4,7 +4,7 @@ TEST="Test oops against known failure rate"
>  NAME=test-0003.sh
>  TMPLOG=$TMP/oops.log.$$
>
> -$FWTS -w 80 --klog=oops.txt oops - | grep "oopses" | grep -v "summary" | cut -c7- > $TMPLOG
> +$FWTS --log-format="%line %owner " -w 80 --klog=oops.txt oops - | grep "oopses" | grep -v "summary" | cut -c7- > $TMPLOG
>  diff $TMPLOG oops-0003.log >> $FAILURE_LOG
>  ret=$?
>  if [ $ret -eq 0 ]; then
> --
> 1.7.10
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - May 24, 2012, 6:40 a.m.
On 05/16/2012 09:20 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   oops-0001/oops-0002.log |    8 +++-----
>   oops-0001/test-0002.sh  |    2 +-
>   oops-0001/test-0003.sh  |    2 +-
>   3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/oops-0001/oops-0002.log b/oops-0001/oops-0002.log
> index c37f96d..3b18f01 100644
> --- a/oops-0001/oops-0002.log
> +++ b/oops-0001/oops-0002.log
> @@ -1,13 +1,11 @@
>   summary
> -summary         0 passed, 1 failed, 0 warnings, 0 aborted, 0 skipped, 0
> -summary         info only.
> +summary         0 passed, 1 failed, 0 warnings, 0 aborted, 0 skipped, 0 info only.
>   summary
>   summary         Test Failure Summary
> -summary         ====================
> +summary         ==========================================================================================================================================================================================================================================================================================================================================================================================
>   summary
>   summary         Critical failures: 1
> -summary          oops test, at 1 log line: 1527
> -summary           "Found 36 oopses in kernel log."
> +summary          oops test, at 1 log : Found 36 oopses in kernel log.
>   summary
>   summary         High failures: NONE
>   summary
> diff --git a/oops-0001/test-0002.sh b/oops-0001/test-0002.sh
> index eb43148..9b5e1bc 100755
> --- a/oops-0001/test-0002.sh
> +++ b/oops-0001/test-0002.sh
> @@ -4,7 +4,7 @@ TEST="Test oops summary table against known failure patterns"
>   NAME=test-0002.sh
>   TMPLOG=$TMP/oops.log.$$
>
> -$FWTS -w 80 --klog=oops.txt oops - | grep summary | grep -v "log line:" | cut -c7->  $TMPLOG
> +$FWTS --log-format="%line %owner " -w 400 --klog=oops.txt oops - | grep summary | sed 's/line: [0-9]*//' | cut -c7->  $TMPLOG
>   grep -v "log line:" oops-0002.log | diff $TMPLOG ->>  $FAILURE_LOG
>   ret=$?
>   if [ $ret -eq 0 ]; then
> diff --git a/oops-0001/test-0003.sh b/oops-0001/test-0003.sh
> index 240fb4d..8efb02d 100755
> --- a/oops-0001/test-0003.sh
> +++ b/oops-0001/test-0003.sh
> @@ -4,7 +4,7 @@ TEST="Test oops against known failure rate"
>   NAME=test-0003.sh
>   TMPLOG=$TMP/oops.log.$$
>
> -$FWTS -w 80 --klog=oops.txt oops - | grep "oopses" | grep -v "summary" | cut -c7->  $TMPLOG
> +$FWTS --log-format="%line %owner " -w 80 --klog=oops.txt oops - | grep "oopses" | grep -v "summary" | cut -c7->  $TMPLOG
>   diff $TMPLOG oops-0003.log>>  $FAILURE_LOG
>   ret=$?
>   if [ $ret -eq 0 ]; then
Acked-by: Ivan Hu<ivan.hu@canonical.com>

Patch

diff --git a/oops-0001/oops-0002.log b/oops-0001/oops-0002.log
index c37f96d..3b18f01 100644
--- a/oops-0001/oops-0002.log
+++ b/oops-0001/oops-0002.log
@@ -1,13 +1,11 @@ 
 summary         
-summary         0 passed, 1 failed, 0 warnings, 0 aborted, 0 skipped, 0
-summary         info only.
+summary         0 passed, 1 failed, 0 warnings, 0 aborted, 0 skipped, 0 info only.
 summary         
 summary         Test Failure Summary
-summary         ====================
+summary         ==========================================================================================================================================================================================================================================================================================================================================================================================
 summary         
 summary         Critical failures: 1
-summary          oops test, at 1 log line: 1527
-summary           "Found 36 oopses in kernel log."
+summary          oops test, at 1 log : Found 36 oopses in kernel log.
 summary         
 summary         High failures: NONE
 summary         
diff --git a/oops-0001/test-0002.sh b/oops-0001/test-0002.sh
index eb43148..9b5e1bc 100755
--- a/oops-0001/test-0002.sh
+++ b/oops-0001/test-0002.sh
@@ -4,7 +4,7 @@  TEST="Test oops summary table against known failure patterns"
 NAME=test-0002.sh
 TMPLOG=$TMP/oops.log.$$
 
-$FWTS -w 80 --klog=oops.txt oops - | grep summary | grep -v "log line:" | cut -c7- > $TMPLOG
+$FWTS --log-format="%line %owner " -w 400 --klog=oops.txt oops - | grep summary | sed 's/line: [0-9]*//' | cut -c7- > $TMPLOG
 grep -v "log line:" oops-0002.log | diff $TMPLOG - >> $FAILURE_LOG
 ret=$?
 if [ $ret -eq 0 ]; then 
diff --git a/oops-0001/test-0003.sh b/oops-0001/test-0003.sh
index 240fb4d..8efb02d 100755
--- a/oops-0001/test-0003.sh
+++ b/oops-0001/test-0003.sh
@@ -4,7 +4,7 @@  TEST="Test oops against known failure rate"
 NAME=test-0003.sh
 TMPLOG=$TMP/oops.log.$$
 
-$FWTS -w 80 --klog=oops.txt oops - | grep "oopses" | grep -v "summary" | cut -c7- > $TMPLOG
+$FWTS --log-format="%line %owner " -w 80 --klog=oops.txt oops - | grep "oopses" | grep -v "summary" | cut -c7- > $TMPLOG
 diff $TMPLOG oops-0003.log >> $FAILURE_LOG
 ret=$?
 if [ $ret -eq 0 ]; then