1#!/bin/bash 2# 3# Software injection based test cases: test cases are triggered via 4# mce-inject tool. 5# 6# Copyright (C) 2009, Intel Corp. 7# Author: Huang Ying <ying.huang@intel.com> 8# 9# This file is released under the GPLv2. 10# 11 12. $ROOT/lib/functions.sh 13. $ROOT/lib/dirs.sh 14. $ROOT/lib/mce.sh 15. $ROOT/lib/soft-inject.sh 16 17enumerate() 18{ 19 soft_inject_enumerate 20} 21 22trigger() 23{ 24 reset_severity_cov 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 soft_inject_get_mcelog 33 get_severity_cov 34} 35 36verify() 37{ 38 local removes="TSC TIME PROCESSOR" 39 case "$bcase" in 40 ucna|ucna_over|srar_poll) 41 soft_inject_verify_mcelog 42 verify_klog $klog 43 ;; 44 fatal_poll) 45 removes="$removes RIP" 46 soft_inject_verify_mcelog 47 verify_klog $klog 48 ;; 49 *) 50 echo "!!! Unknown case: $this_case !!!" 51 esac 52} 53 54soft_inject_main "$@" 55