Hello,

attached another patch.

Changes:

1.  arch= `uname -m`   --> arch=`uname -m` (white space removed)
2.  added  summary file for printing results table
3.  added reboot command to test script.

Some notes about 3:
 I verified kdump behaviour on 2.6.21 kernel.org kernel. In some cases
target (qemu in my case) doesn't reboot. And test cycle stops. I think that
it will be reasonably to run all test and print summary table which tests
are pass and which are not.


Also I don't like that testing module names lkdtm.ko. Main stream kernel
already has module with such name. So test module will not be loaded if
this module already exist in the kernel.

--
Best regards,
Maxim Uvarov
diff -Nuar ltp/testcases/kdump/setup ltp/testcases/kdump_new/setup
--- ltp/testcases/kdump/setup	2007-05-24 19:05:33.000000000 +0000
+++ ltp/testcases/kdump_new/setup	2007-05-24 19:14:22.000000000 +0000
@@ -21,7 +21,7 @@
 LINUX_2_6_16=2616
 
 # Determine architecture we're running on
-arch= `uname -m`
+arch=`uname -m`
 if [ `echo $arch |grep -e "i[3-6]86"` ]
 then
         CRASHKERNEL=$X86_CRASHKERNEL
diff -Nuar ltp/testcases/kdump/summary ltp/testcases/kdump_new/summary
--- ltp/testcases/kdump/summary	1970-01-01 00:00:00.000000000 +0000
+++ ltp/testcases/kdump_new/summary	2007-05-24 19:00:32.000000000 +0000
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. control
+
+TESTS=`cat ./testfile`
+total=0
+pass=0
+fail=0
+nottested=0
+
+echo "	RESULTS:"
+
+for TEST in $TESTS; do
+	total=`expr $total + 1`
+
+	LOG=`cat $RESULTS_DIR/\`ls $RESULTS_DIR/ |grep  $TEST\` 2>/dev/null`
+	if [ $? != 0 ]; then
+    		echo "$TEST:	NOT TESTED"
+    		nottested=`expr $nottested + 1`
+	else
+	# We think that test pass if elfread prints word Magic	
+		echo $LOG |grep "Magic" > /dev/null
+		if [ $? == 0 ]; then
+    			echo "$TEST:	PASS"
+    			pass=`expr $pass + 1`
+		else
+    			echo "$TEST:	FAIL"
+    			fail=`expr $fail + 1`
+		fi
+	fi
+done
+
+echo "------------------"
+echo "Total:	$total"
+echo "Pass:	$pass"
+echo "Fail:	$fail"
+echo "NT:	$nottested"
diff -Nuar ltp/testcases/kdump/test ltp/testcases/kdump_new/test
--- ltp/testcases/kdump/test	2007-04-17 06:28:23.000000000 +0000
+++ ltp/testcases/kdump_new/test	2007-05-24 19:18:27.000000000 +0000
@@ -192,3 +192,9 @@
 
 esac
 
+# Some tests could not reboot target. They can hung up machine
+# or leave it working. But we need to do all tests. So
+# we are going to reboot if we are in wrong place.
+
+sleep 30
+reboot
\ No newline at end of file
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to