aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiajia Zheng <jiajia.zheng@intel.com>2009-08-21 14:20:07 +0800
committerHuang Ying <ying.huang@intel.com>2009-08-31 13:35:12 +0800
commit111e5c13b4b9fdacff3eeede594e4d86f2742c28 (patch)
tree8db24bbfb0db24b9e0a37c70a360f5edde88f048
parent133643a89a54e811d60c80ad48514852cf74aea0 (diff)
downloadmce-test-111e5c13b4b9fdacff3eeede594e4d86f2742c28.tar.gz
New test case to test conditional control in machine_check_poll
Add a new test group -- poll_noser, add three cases -- fatal_poll, srar_poll and uc_poll to test the conditional control statement in machine_check_poll. Signed-off-by: Jiajia Zheng <jiajia.zheng@intel.com> Signed-off-by: Huang Ying <ying.huang@intel.com>
-rwxr-xr-xcases/soft-inj/poll_noser/cases.sh49
-rw-r--r--cases/soft-inj/poll_noser/data/uc_poll6
-rw-r--r--cases/soft-inj/poll_noser/refer/uc_poll1
-rwxr-xr-xcases/soft-inj/poll_ucr/cases.sh7
-rw-r--r--cases/soft-inj/poll_ucr/data/fatal_poll6
-rw-r--r--cases/soft-inj/poll_ucr/data/srar_poll9
-rw-r--r--cases/soft-inj/poll_ucr/refer/srar_poll1
-rw-r--r--config/simple_nopanic_noser.conf2
-rw-r--r--config/simple_noser.conf2
-rw-r--r--config/simple_poll_noser.conf4
10 files changed, 84 insertions, 3 deletions
diff --git a/cases/soft-inj/poll_noser/cases.sh b/cases/soft-inj/poll_noser/cases.sh
new file mode 100755
index 0000000..82929d8
--- /dev/null
+++ b/cases/soft-inj/poll_noser/cases.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Software injection based test cases: test cases are triggered via
+# the mce-inject tool.
+#
+# Copyright (C) 2009, Intel Corp.
+# Author: Jiajia Zheng <jiajia.zheng@intel.com>
+#
+# This file is released under the GPLv2.
+#
+
+. $ROOT/lib/functions.sh
+. $ROOT/lib/dirs.sh
+. $ROOT/lib/mce.sh
+. $ROOT/lib/soft-inject.sh
+
+enumerate()
+{
+ soft_inject_enumerate
+}
+
+trigger()
+{
+ reset_severity_cov
+ soft_inject_trigger
+}
+
+get_result()
+{
+ soft_inject_get_klog
+ get_gcov arch/x86/kernel/cpu/mcheck/mce.c
+ soft_inject_get_mcelog
+ get_severity_cov
+}
+
+verify()
+{
+ local removes="TSC TIME PROCESSOR"
+ case "$bcase" in
+ uc_poll)
+ soft_inject_verify_mcelog
+ verify_klog $klog
+ ;;
+ *)
+ echo "!!! Unknown case: $this_case !!!"
+ esac
+}
+
+soft_inject_main "$@"
diff --git a/cases/soft-inj/poll_noser/data/uc_poll b/cases/soft-inj/poll_noser/data/uc_poll
new file mode 100644
index 0000000..ef81543
--- /dev/null
+++ b/cases/soft-inj/poll_noser/data/uc_poll
@@ -0,0 +1,6 @@
+CPU 1 BANK 4
+MCGSTATUS MCIP
+STATUS UNCORRECTED
+RIP 12343434
+MISC 11
+POLL
diff --git a/cases/soft-inj/poll_noser/refer/uc_poll b/cases/soft-inj/poll_noser/refer/uc_poll
new file mode 100644
index 0000000..ea30561
--- /dev/null
+++ b/cases/soft-inj/poll_noser/refer/uc_poll
@@ -0,0 +1 @@
+#empty
diff --git a/cases/soft-inj/poll_ucr/cases.sh b/cases/soft-inj/poll_ucr/cases.sh
index 23f8c5e..c34ff3d 100755
--- a/cases/soft-inj/poll_ucr/cases.sh
+++ b/cases/soft-inj/poll_ucr/cases.sh
@@ -37,10 +37,15 @@ verify()
{
local removes="TSC TIME PROCESSOR"
case "$bcase" in
- ucna|ucna_over)
+ ucna|ucna_over|srar_poll)
soft_inject_verify_mcelog
verify_klog $klog
;;
+ fatal_poll)
+ removes="$removes RIP"
+ soft_inject_verify_mcelog
+ verify_klog $klog
+ ;;
*)
echo "!!! Unknown case: $this_case !!!"
esac
diff --git a/cases/soft-inj/poll_ucr/data/fatal_poll b/cases/soft-inj/poll_ucr/data/fatal_poll
new file mode 100644
index 0000000..7efb316
--- /dev/null
+++ b/cases/soft-inj/poll_ucr/data/fatal_poll
@@ -0,0 +1,6 @@
+CPU 1 BANK 4
+MCGSTATUS MCIP
+STATUS FATAL
+RIP 12343434
+MISC 11
+POLL
diff --git a/cases/soft-inj/poll_ucr/data/srar_poll b/cases/soft-inj/poll_ucr/data/srar_poll
new file mode 100644
index 0000000..f57b5de
--- /dev/null
+++ b/cases/soft-inj/poll_ucr/data/srar_poll
@@ -0,0 +1,9 @@
+CPU 0 BANK 2
+STATUS UNCORRECTED SRAR
+MCGSTATUS EIPV MCIP
+ADDR 0x1234
+RIP 0x73:0x2eadbabe
+POLL
+HOLD
+CPU 1 BANK 0
+
diff --git a/cases/soft-inj/poll_ucr/refer/srar_poll b/cases/soft-inj/poll_ucr/refer/srar_poll
new file mode 100644
index 0000000..ea30561
--- /dev/null
+++ b/cases/soft-inj/poll_ucr/refer/srar_poll
@@ -0,0 +1 @@
+#empty
diff --git a/config/simple_nopanic_noser.conf b/config/simple_nopanic_noser.conf
index 7d1a5d3..835d9e6 100644
--- a/config/simple_nopanic_noser.conf
+++ b/config/simple_nopanic_noser.conf
@@ -1,4 +1,4 @@
-CASES="soft-inj/non-panic/cases.sh"
+CASES="soft-inj/non-panic/cases.sh soft-inj/poll_noser/cases.sh"
GCOV=1
KSRC_DIR=/lib/modules/$(uname -r)/build
diff --git a/config/simple_noser.conf b/config/simple_noser.conf
index e9c6e1a..b562070 100644
--- a/config/simple_noser.conf
+++ b/config/simple_noser.conf
@@ -1,4 +1,4 @@
-CASES="soft-inj/non-panic/cases.sh soft-inj/panic/cases.sh soft-inj/panic_npcc/cases.sh soft-inj/panic_noser/cases.sh"
+CASES="soft-inj/non-panic/cases.sh soft-inj/panic/cases.sh soft-inj/panic_npcc/cases.sh soft-inj/panic_noser/cases.sh soft-inj/poll_noser/cases.sh"
GCOV=1
KSRC_DIR=/lib/modules/$(uname -r)/build
diff --git a/config/simple_poll_noser.conf b/config/simple_poll_noser.conf
new file mode 100644
index 0000000..6b7eb79
--- /dev/null
+++ b/config/simple_poll_noser.conf
@@ -0,0 +1,4 @@
+
+CASES="soft-inj/poll_noser/cases.sh"
+GCOV=1
+KSRC_DIR=/lib/modules/$(uname -r)/build