diff options
author | Cyril Hrubis <chrubis@suse.cz> | 2010-02-19 19:18:02 +0100 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-02-19 19:18:02 +0100 |
commit | e9a764e21bcbf1e9d90869349d6080a412918a1e (patch) | |
tree | 094c4508eee0960cc835ebea491113a40ab5ba1a | |
parent | ea5ae50de596ea89840b3877165286be0e432247 (diff) | |
download | mce-test-e9a764e21bcbf1e9d90869349d6080a412918a1e.tar.gz |
There is problem with commit 138d18351a725e7ef43e6ae4fb7c9405718a797d that
added clearing and backing up old logs for kdump driver. As testcases causes
reboot and the script is re-run after each reboot the test ends up in infinite
loop (as setupped stamp is moved).
Second one is with loading mce-inject module. The kdump test driver is
appereantly run with "set -ex" so all lines that can return non zero (and
should not stop script exectuion) must be used only as a part of a
conditionals.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rwxr-xr-x | drivers/kdump/driver.sh | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/kdump/driver.sh b/drivers/kdump/driver.sh index 712718c..3866717 100755 --- a/drivers/kdump/driver.sh +++ b/drivers/kdump/driver.sh @@ -232,15 +232,13 @@ if [ ! -f $WDIR/stamps/setupped ]; then exit -1 fi -[ -d $RDIR ] && mv $RDIR --backup=numbered -T $RDIR.old -[ -d $WDIR ] && mv $WDIR --backup=numbered -T $WDIR.old - #if mce_inject is a module, it is ensured to have been loaded -modinfo mce_inject > /dev/null 2>&1 -if [ $? -eq 0 ]; then - lsmod | grep mce_inject > /dev/null 2>&1 - [ $? -eq 0 ] || modprobe mce_inject - [ $? -eq 0 ] || die "module mce_inject isn't supported ?" +if modinfo mce_inject > /dev/null 2>&1; then + if ! lsmod | grep -q mce_inject; then + if ! modprobe mce_inject; then + die "module mce_inject isn't supported ?" + fi + fi fi for case_sh in ${CASES}; do |