selftests/memory-hotplug: Restore memory before exit
Subsystems (3)
Hi,
Thanks for your review, I have submit the patches in a new version as your suggestion.
Best Wishes,
Gongyi
Quoted 45 lines · Zhao Gongyi
Quoted 6 lines
Some momory will be left in offline state when calling
offline_memory_expect_fail()failed. Restore it before exit.Signed-off-by Zhao Gongyi <[email protected]>--- .../memory-hotplug/mem-on-off-test.sh | 24+++++++++++++------
Quoted 11 lines
1 file changed, 17 insertions(+), 7 deletions(-)tools/testing/selftests/memory-hotplug/mem-on-off-test.sh +0
-0@@ -134,6 +134,17 @@ offline_memory_expect_fail() return 0 }tools/testing/selftests/memory-hotplug/mem-on-off-test.sh offline_memory_expect_fail() · line 146
Quoted 10 lines
tools/testing/selftests/memory-hotplug/mem-on-off-test.sh +10
-0+online_all_hot_pluggable_memory() +{ + + for memory in `hotpluggable_offline_memory`; do + online_memory_expect_success $memory || { + echo "online memory $memory: unexpected fail" + retval=1 + } + done +}Maybe call it
"
online_all_offline_memory()"instead?
Note that "removable" as used in
hotpluggable_memory()will nowadays always return "1" if the kernel supports memory hotunplug, independent of the specific memory block.--
Thanks,David / dhildenb