On 08.10.22 03:40, zhaogongyi wrote:
> Hi!
>
>>
>> On 30.09.22 10:52, zhaogongyi wrote:
>>> Hi!
>>>
>>>>
>>>> On 30.09.22 08:35, Zhao Gongyi wrote:
>>>>> 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
>>>> ++++++++++++++-----
>>>>> 1 file changed, 16 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
>>>> b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
>>>>> index 1d87611a7d52..91a7457616bb 100755
>>>>> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
>>>>> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
>>>>> @@ -134,6 +134,16 @@ offline_memory_expect_fail()
>>>>> return 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.
>>
>> But online_memory_expect_success() already prints a warning, no?
>
> Yes, online_memory_expect_success() already prints a warning, remove the warning in online_all_offline_memory() seems ok,
>
> My previous consideration was that one more log information would make it easier to locate the wrong location.
Let's keep it simple unless there is real reason to warn twice.
--
Thanks,
David / dhildenb
On 10/10/22 00:54, David Hildenbrand wrote:
> On 08.10.22 03:40, zhaogongyi wrote:
>>
>> Yes, online_memory_expect_success() already prints a warning, remove the warning in online_all_offline_memory() seems ok,
>>
>> My previous consideration was that one more log information would make it easier to locate the wrong location.
>
> Let's keep it simple unless there is real reason to warn twice.
>
zhaogongyi,
Please note that I already applied the patches to linux-kselftest
next for my second pull request before the merge window. Please
send the change David requested in a separate patch on top of
next as a fix.
thanks,
-- Shuah