aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Gong <gong.chen@linux.intel.com>2012-07-23 11:16:31 +0800
committerChen, Gong <gong.chen@linux.intel.com>2015-01-21 21:23:59 -0500
commit80a63c7a7f74a8f0661006e51a48f122fe3a3858 (patch)
tree1edbb9d1cdb560a418975b79144a62bfe188fccf
parent3793ad983b1fe2873c55c6a4066669d2b95fc871 (diff)
downloadmce-test-80a63c7a7f74a8f0661006e51a48f122fe3a3858.tar.gz
Minor fixes for MCE-test
Many minor fixes are added. Some for compatibility, some for enhancement, and the others for bug fixes. Signed-off-by: Chen Gong <gong.chen@linux.intel.com>
-rw-r--r--Makefile1
-rw-r--r--cases/function/hwpoison/Makefile2
-rwxr-xr-x[-rw-r--r--]cases/function/hwpoison/random_offline0
-rwxr-xr-xmcemenu2
-rwxr-xr-xrunmcetest27
5 files changed, 26 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 366f71f..6256fcb 100644
--- a/Makefile
+++ b/Makefile
@@ -14,5 +14,4 @@ install:
reset:
rm -rf bin/*
rm -rf work/*
- rm -rf results/*
diff --git a/cases/function/hwpoison/Makefile b/cases/function/hwpoison/Makefile
index 1256feb..fb2fca6 100644
--- a/cases/function/hwpoison/Makefile
+++ b/cases/function/hwpoison/Makefile
@@ -10,7 +10,7 @@ all: ${EXE}
install: all
cp ttranshuge ../../../bin/
-tinjpage: LDFLAGS += -lpthread
+tinjpage: LDFLAGS += -pthread
clean:
rm -f ${EXE} ${OBJ}
diff --git a/cases/function/hwpoison/random_offline b/cases/function/hwpoison/random_offline
index ecd0b3e..ecd0b3e 100644..100755
--- a/cases/function/hwpoison/random_offline
+++ b/cases/function/hwpoison/random_offline
diff --git a/mcemenu b/mcemenu
index cfd93c5..6836c24 100755
--- a/mcemenu
+++ b/mcemenu
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
################################################################################
## ##
## This program is free software; you can redistribute it and#or modify ##
diff --git a/runmcetest b/runmcetest
index bf87d74..8bf9554 100755
--- a/runmcetest
+++ b/runmcetest
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
################################################################################
## ##
## This program is free software; you can redistribute it and#or modify ##
@@ -47,16 +47,37 @@ NOCASE_MSG="The case list file is not valid, please check \
and run again."
ROUND_MSG="The running time is not a valid value, please make
use of a nonnegtive integer and run again."
+EXIT_MSG="Delete all files under temporary directory"
# Function: cleanup
#
# Description: Remove all temporary files created by this program. Cleanup
# always called on program exit.
+
cleanup()
{
if ! [ "X${TMP_DIR}" == "X" ]
then
- rm -rf $TMP_DIR/*
+ answer=""
+ # if this script is called by mcemenu, skip query part
+ pid=`echo $$`
+ ppid=`pgrep mcemenu`
+ for id in $ppid; do
+ pgrep -P $id | grep $pid
+ if [ $? -eq 0 ]; then
+ answer="YES"
+ break;
+ fi
+ done
+ if [ -z $answer ]; then
+ read -p "$EXIT_MSG \"${TMP_DIR}\"? [Yes/No]:" answer
+ answer=`echo $answer | tr 'a-z' 'A-Z'`
+ fi
+ if [ "${answer}" == "Y" -o "${answer}" == "YES" \
+ -o "${answer}" == "" ]
+ then
+ rm -rf $TMP_DIR/*
+ fi
fi
}
@@ -174,7 +195,7 @@ usage()
usage: ${0##*/} [ -t TMPDIR ] [ -s SUMFILE ] [ -o OUTDIR ]
[ -b TOODIR ] [ -l CASEFILE ] [ -r RUNTIMES ]
- -t TMPDIR Directory where temporary files will be created.
+ -t TMPDIR Directory where temporary files will be created. Don't use important directory.
-s SUMDIR Directory where summary files will be created.
-o OUTDIR Directory where raw test outputs will be created.
-b TOODIR Directory where tool utilities will be placed.