selftests/memory-hotplug: Restore memory before exit
Subsystems (3)
Hi!
Quoted 20 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 | 21++++++++++++++-----
Review
Quoted 3 lines
1 file changed, 16 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/tools/testing/selftests/memory-hotplug/mem-on-off-test.shQuoted 7 lines
index
1d87611a7d52..91a7457616bb100755tools/testing/selftests/memory-hotplug/mem-on-off-test.sh +0
-0@@ -134,6 +134,16 @@ offline_memory_expect_fail() return 0 }
Quoted 7 lines
tools/testing/selftests/memory-hotplug/mem-on-off-test.sh offline_memory_expect_fail() · line 141
Quoted 5 lines
tools/testing/selftests/memory-hotplug/mem-on-off-test.sh +5
-0+online_all_offline_memory() +{ + for memory in `hotpluggable_offline_memory`; do + if ! online_memory_expect_success $memory; then + echo "$FUNCNAME $memory: unexpected fail" >&2Do we need that output?
In my opinion, if online a memory node failed ,it should be a kernel bug catched, so, I think the output here is needed.
Thanks!
Gongyi
Quoted 30 lines · zhaogongyi
Hi!
Quoted 20 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 | 21++++++++++++++-----
Review
Quoted 3 lines
1 file changed, 16 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/tools/testing/selftests/memory-hotplug/mem-on-off-test.shQuoted 7 lines
index
1d87611a7d52..91a7457616bb100755tools/testing/selftests/memory-hotplug/mem-on-off-test.sh +0
-0@@ -134,6 +134,16 @@ offline_memory_expect_fail() return 0 }Quoted 7 lines
tools/testing/selftests/memory-hotplug/mem-on-off-test.sh offline_memory_expect_fail() · line 141
Quoted 5 lines
tools/testing/selftests/memory-hotplug/mem-on-off-test.sh +5
-0+online_all_offline_memory() +{ + for memory in `hotpluggable_offline_memory`; do + if ! online_memory_expect_success $memory; then + echo "$FUNCNAME $memory: unexpected fail" >&2Do we need that output?
Quoted 1 line
In my opinion, if online a memory node failed ,it should be a kernel bug catched, so, I think the output here is needed.
But online_memory_expect_success() already prints a warning, no?
Signature · 3 lines
Thanks, David / dhildenb