diff options
Diffstat (limited to 'tools/testing/selftests/memory-hotplug')
| -rw-r--r-- | tools/testing/selftests/memory-hotplug/Makefile | 3 | ||||
| -rw-r--r-- | tools/testing/selftests/memory-hotplug/on-off-test.sh | 8 |
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 @@ | |||
| 1 | all: | 1 | all: |
| 2 | 2 | ||
| 3 | run_tests: | 3 | run_tests: |
| 4 | @/bin/bash ./on-off-test.sh -r 2 || echo "memory-hotplug selftests: [FAIL]" | ||
| 5 | |||
| 6 | run_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 | ||
| 6 | clean: | 9 | clean: |
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 | ||
| 143 | prerequisite | 143 | prerequisite |
| 144 | 144 | ||
| 145 | echo "Test scope: $ratio% hotplug memory" | ||
| 146 | echo -e "\t online all hotplug memory in offline state" | ||
| 147 | echo -e "\t offline $ratio% hotplug memory in online state" | ||
| 148 | echo -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 | # |
| 148 | for memory in `hotplaggable_offline_memory`; do | 153 | for memory in `hotplaggable_offline_memory`; do |
| 154 | echo offline-online $memory | ||
| 149 | online_memory_expect_success $memory | 155 | online_memory_expect_success $memory |
| 150 | done | 156 | done |
| 151 | 157 | ||
| @@ -154,6 +160,7 @@ done | |||
| 154 | # | 160 | # |
| 155 | for memory in `hotpluggable_online_memory`; do | 161 | for 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 |
| 159 | done | 166 | done |
| @@ -162,6 +169,7 @@ done | |||
| 162 | # Online all hot-pluggable memory again | 169 | # Online all hot-pluggable memory again |
| 163 | # | 170 | # |
| 164 | for memory in `hotplaggable_offline_memory`; do | 171 | for memory in `hotplaggable_offline_memory`; do |
| 172 | echo offline-online $memory | ||
| 165 | online_memory_expect_success $memory | 173 | online_memory_expect_success $memory |
| 166 | done | 174 | done |
| 167 | 175 | ||
