diff options
author | Wen Jin <wenx.jin@intel.com> | 2016-03-22 14:56:20 +0800 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2016-04-11 15:32:38 -0700 |
commit | f058829ed8a17a2d8f51d435d3f32afcd2704699 (patch) | |
tree | 6dddcf0ce73d506c1120afad4940ee6e315c9e19 | |
parent | 3344e067bcf3679bf25797fdf0689b7dd76465dd (diff) | |
download | mce-test-f058829ed8a17a2d8f51d435d3f32afcd2704699.tar.gz |
Support daemon exit automatically
1. add --pid to support tail exit automatically after
script is ended
2. Add delay to ensure physical address got from victim
Signed-off-by: Wen Jin <wenx.jin@intel.com>
Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rwxr-xr-x | cases/function/core_recovery/srar_recovery.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cases/function/core_recovery/srar_recovery.sh b/cases/function/core_recovery/srar_recovery.sh index ae64af9..44d1f81 100755 --- a/cases/function/core_recovery/srar_recovery.sh +++ b/cases/function/core_recovery/srar_recovery.sh @@ -69,13 +69,15 @@ rmmod $EDAC_TYPE >/dev/null 2>&1 [ -e $ROOT/bin/victim ] || invalid "file victim doesn't exist!" \ "maybe you forget to execute make install under directory $ROOT before test" +killall victim > /dev/null 2>&1 touch trigger -tail -f trigger | victim $1 > log & +tail -f trigger --pid=$$ | victim $1 > log & +sleep 1 addr=`cat log |cut -d' ' -f6|head -1` apei_inj $addr sleep 1 echo go > trigger -sleep 2 +sleep 5 rm -f trigger log id=`pgrep victim` if [ X"$id" != X ]; then |