aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJin Wen <wen.jin@intel.com>2019-05-21 11:04:52 +0800
committerTony Luck <tony.luck@intel.com>2021-07-20 12:49:04 -0700
commit82002d1d1472a42dbfc1007614b3ca6c001b3121 (patch)
treeb8ea28dd5d3ab56ffbbf77f0ba2f430c2803fd79
parent7643baf6c3919b3d727e6ba6c2e545dc6a653307 (diff)
downloadmce-test-82002d1d1472a42dbfc1007614b3ca6c001b3121.tar.gz
Add delay in EDAC test to avoid triggering CMCI storm
Sleep one second every ten error injections to avoid triggering CMCI storm. Signed-off-by: Jin Wen <wen.jin@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rwxr-xr-xcases/function/edac/edac.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/cases/function/edac/edac.sh b/cases/function/edac/edac.sh
index 5c96cf1..18c2578 100755
--- a/cases/function/edac/edac.sh
+++ b/cases/function/edac/edac.sh
@@ -125,6 +125,7 @@ inject_lot_ce()
local rand_addr
local test_pfn
local test_addr
+ local count=1
dmesg -c &> /dev/null
: > edac_mesg
@@ -155,6 +156,13 @@ inject_lot_ce()
echo $test_addr > $EINJ_IF/param1
echo 1 > $EINJ_IF/error_inject
dmesg -c >> edac_mesg
+ # to avoid triggering cmci storm
+ if [ $count -ge 10 ]; then
+ count=1
+ sleep 1
+ else
+ let "count += 1"
+ fi
done
done < iomem_tmp
# avoid some messages coming later
@@ -167,6 +175,7 @@ inject_lot_ce()
inject_spec_addr()
{
local addr
+ local count=1
dmesg -c &> /dev/null
echo $ERR_TYPE > $EINJ_IF/error_type
@@ -182,6 +191,13 @@ inject_spec_addr()
echo $addr > $EINJ_IF/param1
echo 1 > $EINJ_IF/error_inject
check_result "$line"
+ # to avoid triggering cmci storm
+ if [ $count -ge 10 ]; then
+ count=1
+ sleep 1
+ else
+ let "count += 1"
+ fi
done < $EDAC_REF_FILE
}