[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    [LTP] [PATCH] KDUMP summary script of LTP kdump can't retrieve
From:       Subrata Modak <subrata () linux ! vnet ! ibm ! com>
Date:       2007-11-27 6:55:17
Message-ID: 1196145797.4464.4.camel () subratamodak ! linux ! ibm ! com
[Download RAW message or body]

Hi,

Please find the following Problem definition and solution (patch) for
KDUMP summary script of LTP:


Problem description(shenlinf@cn.ibm.com,):
I am testing kdump test automation suite with LTP 20071031.

Summary script is provided in the test suite. It tries to summarize the test
result with the logfile under $RESULTS_DIR(which is specified in ./control
file), but there are two problems.

1. The standard output of "ls $RESULTS_DIR" is redirected to /dev/null so no
logfile name can be retrieved. Seems that it should be the standard error output
to be redirected to /dev/null.
--------------------
     16         LOG=`cat $RESULTS_DIR/\`ls $RESULTS_DIR/ >/dev/null|grep  $TEST\
       ` 2>/dev/null`
--------------------

2. The script is designed for NUM_ITERATIONS=1.

Here is result of summary script.
---------------------------------
[root@galluslp1 kdump]# cat config | grep NUM_ITERATIONS
NUM_ITERATIONS=2
[root@galluslp1 kdump]# cat control
CUR_TEST=2
PREV_TEST=1
ITERATION=2
RESULTS_DIR=/root/ltp-full-20071031/testcases/kdump/results/galluslp1.upt.austin.ibm.com.2007-11-20-11:18:16
 [root@galluslp1 kdump]# ./summary
        RESULTS:
ACS:    NOT TESTED
ACP:    NOT TESTED
ACE:    NOT TESTED
ACL:    NOT TESTED
------------------
Total:  4
Pass:   0
Fail:   0
NT:     4
[root@galluslp1 kdump]#
---------------------------------

BTW: There isn't any place to invoke this script. I don't see any summary under
result directory.

patch to fix both problems.

--Subrata--


["27_11_2007-(shenlinf@cn.ibm.com)-kdump-summary.patch" (27_11_2007-(shenlinf@cn.ibm.com)-kdump-summary.patch)]

diff -upNr ltp-full-20071031.orig/testcases/kdump/summary ltp-full-20071031/testcases/kdump/summary
--- ltp-full-20071031.orig/testcases/kdump/summary	2007-11-27 00:04:33.000000000 -0600
+++ ltp-full-20071031/testcases/kdump/summary	2007-11-27 00:05:36.000000000 -0600
@@ -1,5 +1,6 @@
 #!/bin/bash
 
+. config
 . control
 
 TESTS=`cat ./testfile`
@@ -10,10 +11,12 @@ nottested=0
 
 echo "	RESULTS:"
 
-for TEST in $TESTS; do
+for i in `seq 1 $NUM_ITERATIONS`; do
+    for TEST in $TESTS; do
 	total=`expr $total + 1`
 
-	LOG=`cat $RESULTS_DIR/\`ls $RESULTS_DIR/ >/dev/null|grep  $TEST\` 2>/dev/null`
+	TEST="$i.$TEST"
+	LOG=`cat $RESULTS_DIR/\`ls $RESULTS_DIR/ 2>/dev/null | grep "^$TEST"\` 2>/dev/null`
 	if [ $? != 0 ]; then
     		echo "$TEST:	NOT TESTED"
     		nottested=`expr $nottested + 1`
@@ -28,6 +31,7 @@ for TEST in $TESTS; do
     			fail=`expr $fail + 1`
 		fi
 	fi
+    done
 done
 
 echo "------------------"


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic