aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen, Gong <gong.chen@linux.intel.com>2014-03-30 22:51:06 -0400
committerChen, Gong <gong.chen@linux.intel.com>2015-01-21 21:24:00 -0500
commit659f55a41d860d4b4b5517e79880ac2fec394840 (patch)
tree2ba75c5e1e78b1e6790781e421c089251471fc54
parent269b8e991e88185065ee9473154ce068efc39f02 (diff)
downloadmce-test-659f55a41d860d4b4b5517e79880ac2fec394840.tar.gz
core_recovery: Fix the bug in DCU/IFU test case
If BIOS is bogus so that error injection can't be executed as expected, curent test case will fail. Fix this bug. Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
-rwxr-xr-xcases/function/core_recovery/srar_recovery.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/cases/function/core_recovery/srar_recovery.sh b/cases/function/core_recovery/srar_recovery.sh
index f011d3d..7b13b5b 100755
--- a/cases/function/core_recovery/srar_recovery.sh
+++ b/cases/function/core_recovery/srar_recovery.sh
@@ -73,8 +73,11 @@ sleep 1
echo go > trigger
sleep 2
rm -f trigger log
-pgrep core_recovery > /dev/null 2>&1 | xargs kill -9 > /dev/null 2>&1
-[ $? -eq 0 ] && invalid "The poisoned process can't be killed by kernel. Test fails!"
+id=`pgrep core_recovery`
+if [ X"$id" != X ]; then
+ echo $id | xargs kill -9 > /dev/null 2>&1
+ invalid "The poisoned process can't be killed by kernel automatically. Test fails!"
+fi
if [ $1 == "-d" ]; then
echo "SRAR/DCU test passes!"