aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen, Gong <gong.chen@linux.intel.com>2013-12-18 03:17:02 -0500
committerChen, Gong <gong.chen@linux.intel.com>2015-01-21 21:24:00 -0500
commitdf2fcc620498414fa28f5e3d2329fd6c701e2ceb (patch)
tree9c59e4645304304cc1bc176e0dcda790b413911d
parent87b2683b0f8460003d07941c004530e226834d69 (diff)
downloadmce-test-df2fcc620498414fa28f5e3d2329fd6c701e2ceb.tar.gz
Add extra hwpoison-inject load check
Add load checker of hwpoison-inject module for all other hwpoison test cases besides run_hugepage_overcommit.sh. Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
-rwxr-xr-xcases/function/hwpoison/run_hard.sh5
-rwxr-xr-xcases/function/hwpoison/run_hugepage.sh5
-rwxr-xr-xcases/function/hwpoison/run_soft.sh5
-rwxr-xr-xcases/function/hwpoison/run_thp.sh5
4 files changed, 20 insertions, 0 deletions
diff --git a/cases/function/hwpoison/run_hard.sh b/cases/function/hwpoison/run_hard.sh
index 781814a..802185f 100755
--- a/cases/function/hwpoison/run_hard.sh
+++ b/cases/function/hwpoison/run_hard.sh
@@ -4,6 +4,11 @@ pushd `dirname $0` > /dev/null
. ./helpers.sh
+load_hwpoison_inject
+
+# make sure we have no hwpoisoned hugepage before starting this test.
+free_resources > /dev/null
+
cat <<-EOF
***************************************************************************
diff --git a/cases/function/hwpoison/run_hugepage.sh b/cases/function/hwpoison/run_hugepage.sh
index 3952975..d1906b2 100755
--- a/cases/function/hwpoison/run_hugepage.sh
+++ b/cases/function/hwpoison/run_hugepage.sh
@@ -10,6 +10,11 @@ pushd `dirname $0` > /dev/null
mount_hugetlbfs
+load_hwpoison_inject
+
+# make sure we have no hwpoisoned hugepage before starting this test.
+free_resources > /dev/null
+
exec_testcase() {
echo "-------------------------------------"
echo "TestCase $@"
diff --git a/cases/function/hwpoison/run_soft.sh b/cases/function/hwpoison/run_soft.sh
index 309d8c7..6d41f4e 100755
--- a/cases/function/hwpoison/run_soft.sh
+++ b/cases/function/hwpoison/run_soft.sh
@@ -4,6 +4,11 @@ pushd `dirname $0` > /dev/null
. ./helpers.sh
+load_hwpoison_inject
+
+# make sure we have no hwpoisoned hugepage before starting this test.
+free_resources > /dev/null
+
cat <<-EOF
***************************************************************************
diff --git a/cases/function/hwpoison/run_thp.sh b/cases/function/hwpoison/run_thp.sh
index 1a967a3..e4099f6 100755
--- a/cases/function/hwpoison/run_thp.sh
+++ b/cases/function/hwpoison/run_thp.sh
@@ -9,6 +9,11 @@ pushd `dirname $0` > /dev/null
. ./helpers.sh
+load_hwpoison_inject
+
+# make sure we have no hwpoisoned hugepage before starting this test.
+free_resources > /dev/null
+
THP_POISON_PRO="ttranshuge"
THP_SYS_PATH="/sys/kernel/mm/transparent_hugepage"