• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2#
3# Software injection based test cases - non-panic cases: test cases
4# are triggered via the mce-inject tool, and they will not trigger kernel
5# panic.
6#
7# Copyright (C) 2008, Intel Corp.
8#   Author: Huang Ying <ying.huang@intel.com>
9#
10# This file is released under the GPLv2.
11#
12
13. $ROOT/lib/functions.sh
14. $ROOT/lib/dirs.sh
15. $ROOT/lib/mce.sh
16. $ROOT/lib/soft-inject.sh
17
18enumerate()
19{
20    soft_inject_enumerate
21}
22
23trigger()
24{
25    soft_inject_trigger
26}
27
28get_result()
29{
30    soft_inject_get_klog
31    get_gcov arch/x86/kernel/cpu/mcheck/mce.c
32
33    case "$bcase" in
34	corrected|corrected_hold|corrected_over|corrected_no_en)
35	    get_mcelog_from_dev $mcelog_result
36	    ;;
37	*)
38	    echo '!!! Unknown case: $this_case !!!'
39    esac
40}
41
42verify()
43{
44    local removes="TSC TIME PROCESSOR"
45    case "$bcase" in
46	corrected|corrected_hold|corrected_over|corrected_no_en)
47	    soft_inject_verify_mcelog
48	    verify_klog $klog
49	    ;;
50	*)
51	    echo "!!! Unknown case: $this_case !!!"
52    esac
53}
54
55soft_inject_main "$@"
56