aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/memory-hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/memory-hotplug')
-rw-r--r--tools/testing/selftests/memory-hotplug/Makefile3
-rw-r--r--tools/testing/selftests/memory-hotplug/on-off-test.sh8
2 files changed, 11 insertions, 0 deletions
diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
index 058c76f5d102..d46b8d489cd2 100644
--- a/tools/testing/selftests/memory-hotplug/Makefile
+++ b/tools/testing/selftests/memory-hotplug/Makefile
@@ -1,6 +1,9 @@
1all: 1all:
2 2
3run_tests: 3run_tests:
4 @/bin/bash ./on-off-test.sh -r 2 || echo "memory-hotplug selftests: [FAIL]"
5
6run_full_test:
4 @/bin/bash ./on-off-test.sh || echo "memory-hotplug selftests: [FAIL]" 7 @/bin/bash ./on-off-test.sh || echo "memory-hotplug selftests: [FAIL]"
5 8
6clean: 9clean:
diff --git a/tools/testing/selftests/memory-hotplug/on-off-test.sh b/tools/testing/selftests/memory-hotplug/on-off-test.sh
index a2816f631542..6cddde0b96f8 100644
--- a/tools/testing/selftests/memory-hotplug/on-off-test.sh
+++ b/tools/testing/selftests/memory-hotplug/on-off-test.sh
@@ -142,10 +142,16 @@ fi
142 142
143prerequisite 143prerequisite
144 144
145echo "Test scope: $ratio% hotplug memory"
146echo -e "\t online all hotplug memory in offline state"
147echo -e "\t offline $ratio% hotplug memory in online state"
148echo -e "\t online all hotplug memory in offline state"
149
145# 150#
146# Online all hot-pluggable memory 151# Online all hot-pluggable memory
147# 152#
148for memory in `hotplaggable_offline_memory`; do 153for memory in `hotplaggable_offline_memory`; do
154 echo offline-online $memory
149 online_memory_expect_success $memory 155 online_memory_expect_success $memory
150done 156done
151 157
@@ -154,6 +160,7 @@ done
154# 160#
155for memory in `hotpluggable_online_memory`; do 161for memory in `hotpluggable_online_memory`; do
156 if [ $((RANDOM % 100)) -lt $ratio ]; then 162 if [ $((RANDOM % 100)) -lt $ratio ]; then
163 echo online-offline $memory
157 offline_memory_expect_success $memory 164 offline_memory_expect_success $memory
158 fi 165 fi
159done 166done
@@ -162,6 +169,7 @@ done
162# Online all hot-pluggable memory again 169# Online all hot-pluggable memory again
163# 170#
164for memory in `hotplaggable_offline_memory`; do 171for memory in `hotplaggable_offline_memory`; do
172 echo offline-online $memory
165 online_memory_expect_success $memory 173 online_memory_expect_success $memory
166done 174done
167 175