diff options
author | Dezhu Zhang <dezhux.zhang@intel.com> | 2019-07-25 13:31:28 +0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2019-07-29 14:59:46 -0700 |
commit | 3760e34c5e68b5b42437b3adf444d595eb2feb1e (patch) | |
tree | 2f6405b21ceaef1aa12e9a46c57358530f37a6c6 | |
parent | 708bfffaf2dc3c5c8203c756d1c52393b97bde4a (diff) | |
download | mce-test-3760e34c5e68b5b42437b3adf444d595eb2feb1e.tar.gz |
mce-test: Unload possible EDAC drivers to avoid interference.
EDAC drivers sometimes claim to handle memory errors. When this happens,
those errors do not appear in mcelog. We already have tests to check
for the sb_edac driver. Add a check for the Skylake driver (skx_edac).
Signed-off-by: Dezhu Zhang <dezhux.zhang@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rwxr-xr-x | cases/function/core_recovery/srar_recovery.sh | 13 | ||||
-rwxr-xr-x | cases/function/kvm/host/host_run.sh | 13 | ||||
-rwxr-xr-x | cases/function/pfa/run_pfa.sh | 13 |
3 files changed, 15 insertions, 24 deletions
diff --git a/cases/function/core_recovery/srar_recovery.sh b/cases/function/core_recovery/srar_recovery.sh index 7fbcecc..9a5bfd7 100755 --- a/cases/function/core_recovery/srar_recovery.sh +++ b/cases/function/core_recovery/srar_recovery.sh @@ -58,15 +58,12 @@ fi # remove possible EDAC module, otherwise, the error information will be ate # by EDAC module and mcelog will not get it. # By now, only i7core_edac and sb_edac hook into the mcelog kernel buffer -cat /proc/modules | grep -q i7core_edac -if [ $? -eq 0 ]; then +if cat /proc/modules | grep -q i7core_edac; then EDAC_TYPE="i7core_edac" -else - cat /proc/modules | grep -q sb_edac - [ $? -eq 0 ] && EDAC_TYPE="sb_edac" -elif - cat /proc/modules | grep -q skx_edac - [ $? -eq 0 ] && EDAC_TYPE="skx_edac" +elif cat /proc/modules | grep -q sb_edac; then + EDAC_TYPE="sb_edac" +elif cat /proc/modules | grep -q skx_edac; then + EDAC_TYPE="skx_edac" fi rmmod $EDAC_TYPE >/dev/null 2>&1 diff --git a/cases/function/kvm/host/host_run.sh b/cases/function/kvm/host/host_run.sh index d58ab68..42ed453 100755 --- a/cases/function/kvm/host/host_run.sh +++ b/cases/function/kvm/host/host_run.sh @@ -73,15 +73,12 @@ rm_edac() # remove possible EDAC module, otherwise, the error information will be ate # by EDAC module and mcelog will not get it. # By now, only i7core_edac and sb_edac hook into the mcelog kernel buffer - cat /proc/modules | grep -q i7core_edac - if [ $? -eq 0 ]; then + if cat /proc/modules | grep -q i7core_edac; then EDAC_TYPE="i7core_edac" - else - cat /proc/modules | grep -q sb_edac - [ $? -eq 0 ] && EDAC_TYPE="sb_edac" - elif - cat /proc/modules | grep -q skx_edac - [ $? -eq 0 ] && EDAC_TYPE="skx_edac" + elif cat /proc/modules | grep -q sb_edac; then + EDAC_TYPE="sb_edac" + elif cat /proc/modules | grep -q skx_edac; then + EDAC_TYPE="skx_edac" fi rmmod $EDAC_TYPE >/dev/null 2>&1 } diff --git a/cases/function/pfa/run_pfa.sh b/cases/function/pfa/run_pfa.sh index 2dcdc1f..fd025fe 100755 --- a/cases/function/pfa/run_pfa.sh +++ b/cases/function/pfa/run_pfa.sh @@ -58,15 +58,12 @@ main() # remove possible EDAC module, otherwise, the error information will be ate # by EDAC module and mcelog will not get it. # By now, only i7core_edac and sb_edac hook into the mcelog kernel buffer - cat /proc/modules | grep -q i7core_edac - if [ $? -eq 0 ]; then + if cat /proc/modules | grep -q i7core_edac; then EDAC_TYPE="i7core_edac" - else - cat /proc/modules | grep -q sb_edac - [ $? -eq 0 ] && EDAC_TYPE="sb_edac" - elif - cat /proc/modules | grep -q skx_edac - [ $? -eq 0 ] && EDAC_TYPE="skx_edac" + elif cat /proc/modules | grep -q sb_edac; then + EDAC_TYPE="sb_edac" + elif cat /proc/modules | grep -q skx_edac; then + EDAC_TYPE="skx_edac" fi rmmod $EDAC_TYPE >/dev/null 2>&1 |