[d2a255]: testcases / kernel / mce-test / cases / soft-inj / non-panic / cases.sh Maximize Restore History

Download this file

cases.sh    56 lines (48 with data), 1.0 kB

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