Hi,

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


Problem description([EMAIL PROTECTED],):
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.
---------------------------------
[EMAIL PROTECTED] kdump]# cat config | grep NUM_ITERATIONS
NUM_ITERATIONS=2
[EMAIL PROTECTED] 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
[EMAIL PROTECTED] kdump]# ./summary
        RESULTS:
ACS:    NOT TESTED
ACP:    NOT TESTED
ACE:    NOT TESTED
ACL:    NOT TESTED
------------------
Total:  4
Pass:   0
Fail:   0
NT:     4
[EMAIL PROTECTED] 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--
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to