Skip to contentSkip to conversation

selftests/memory-hotplug: Restore memory before exit

PATCH zhaogongyi 2 participants 2 messages Sep 30, 2022

Subsystems (3)
lore
Share & tools
lore

zhaogongyi

author
#0 lore raw

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.

---
  .../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.sh

Quoted 7 lines

index 1d87611a7d52..91a7457616bb 100755

tools/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" >&2

Do 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

#1 lore raw
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.

---
   .../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.sh

Quoted 7 lines

index 1d87611a7d52..91a7457616bb 100755

tools/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" >&2

Do 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