aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2009-08-19 09:59:08 +0800
committerHuang Ying <ying.huang@intel.com>2009-08-19 10:28:21 +0800
commita963b68c3b6c91b9656186bffb5e1e7e3babf575 (patch)
tree96f95f1929633b380422bf61d22c5690fca5e87b
parent566d8bcfaed0823d6660cc28d530a9ab1c777dc9 (diff)
downloadmce-test-a963b68c3b6c91b9656186bffb5e1e7e3babf575.tar.gz
Fix some coding style issue
LTP uses Linux kernel coding style now. So fix some coding style issue reported by checkpatch.pl. Signed-off-by: Huang Ying <ying.huang@intel.com>
-rw-r--r--Makefile3
-rwxr-xr-xcases/soft-inj/recoverable_ucr/cases.sh2
-rwxr-xr-xdrivers/kdump/driver.sh17
-rwxr-xr-xdrivers/simple/driver.sh3
-rw-r--r--lib/mce.sh12
5 files changed, 18 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 66e9795..5972106 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,3 @@ test:
test-simple:
$(MAKE) reset
./drivers/simple/driver.sh simple.conf
-
-
-
diff --git a/cases/soft-inj/recoverable_ucr/cases.sh b/cases/soft-inj/recoverable_ucr/cases.sh
index 5a2c17c..61f1036 100755
--- a/cases/soft-inj/recoverable_ucr/cases.sh
+++ b/cases/soft-inj/recoverable_ucr/cases.sh
@@ -37,7 +37,7 @@ verify()
{
local removes="TSC TIME PROCESSOR"
case "$bcase" in
- srao_mem_scrub|srao_ewb|srao_unknown|srao_over|srao_no_en|srao_corrected|srao_ucna)
+ srao_*)
soft_inject_verify_mcelog
verify_klog $klog
soft_inject_verify_return_val
diff --git a/drivers/kdump/driver.sh b/drivers/kdump/driver.sh
index fdf3761..f5982ec 100755
--- a/drivers/kdump/driver.sh
+++ b/drivers/kdump/driver.sh
@@ -29,7 +29,7 @@ setup_crontab ()
set +e
crontab -r
set -e
-
+
# crontab in some distros will not read from STDIN.
cat <<EOF > $WDIR/kdump.cron
@@ -42,7 +42,7 @@ EOF
crontab $WDIR/kdump.cron
echo "Enable cron daemon by default."
-
+
if [ -f /etc/init.d/crond ]; then
cron=crond
else
@@ -53,7 +53,7 @@ EOF
# Red Hat and SUSE.
if [ -x "/sbin/chkconfig" ]; then
/sbin/chkconfig "${cron}" on
-
+
# Debian and Ubuntu.
elif [ -x "/sbin/update-rc.d" ]; then
/sbin/update-rc.d "${cron}" defaults
@@ -64,16 +64,16 @@ setup_kdump ()
{
echo "Start kdump daemon."
/etc/init.d/kdump restart
-
+
echo "Enable kdump daemon by default."
# Red Hat and SUSE.
if [ -x "/sbin/chkconfig" ]; then
/sbin/chkconfig kdump on
-
+
# Debian and Ubuntu.
elif [ -x "/sbin/update-rc.d" ]; then
/sbin/update-rc.d kdump defaults
- fi
+ fi
}
get_klog()
@@ -101,7 +101,8 @@ dump_gcov()
return
fi
if ! chk_gcov; then
- echo "gcov is not supported by kernel, or there is no gcov utility installed, disable gcov support."
+ echo "gcov is not supported by kernel, or there is no " \
+ "gcov utility installed, disable gcov support."
unset GCOV
return
fi
@@ -205,7 +206,7 @@ if [ -z "${COREDIR}" ]; then
die "Fail: some mandatory variables are missing from configuration file."
fi
-# Reboot the machine first to take advantage of boot parameter
+# Reboot the machine first to take advantage of boot parameter
# changes.
if [ ! -f $WDIR/stamps/setupped ]; then
echo "Setup test environment."
diff --git a/drivers/simple/driver.sh b/drivers/simple/driver.sh
index 1936631..8ba21ed 100755
--- a/drivers/simple/driver.sh
+++ b/drivers/simple/driver.sh
@@ -58,7 +58,8 @@ test_all()
export GCOV=copy
export KSRC_DIR
else
- echo "gcov is not supported by kernel, or there is no gcov utility installed, disable gcov support."
+ echo "gcov is not supported by kernel, or there is no " \
+ "gcov utility installed, disable gcov support."
unset GCOV
fi
fi
diff --git a/lib/mce.sh b/lib/mce.sh
index 9c40de7..6bfe9eb 100644
--- a/lib/mce.sh
+++ b/lib/mce.sh
@@ -252,12 +252,12 @@ get_panic_from_mcelog()
local addr
if mcelog_filter $mcelog "#BANK 219#" | head -1 > $tmpf; then
local F="$(sed '1,$s/#/\n/g' $tmpf | awk '/MISC / { print $2 }')"
- case "$F" in
- 0x1) echo "Fatal machine check" ;;
- 0x2) echo "Machine check from unknown source" ;;
- 0x3) echo "Uncorrected data corruption machine check" ;;
- 0x4) echo "Fatal machine check" ;;
- *) echo unknown panic $F ;;
+ case "$F" in
+ 0x1) echo "Fatal machine check" ;;
+ 0x2) echo "Machine check from unknown source" ;;
+ 0x3) echo "Uncorrected data corruption machine check" ;;
+ 0x4) echo "Fatal machine check" ;;
+ *) echo unknown panic $F ;;
esac
fi
}