linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Raghavendra K T <raghavendra.kt@amd.com>
To: urezki@gmail.com
Cc: akpm@linux-foundation.org, urezki@gmail.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Dev Jain <dev.jain@arm.com>
Subject: Re: [PATCH] lib/test_vmalloc.c: introduce xfail for failing tests
Date: Fri, 4 Jul 2025 14:39:11 +0530	[thread overview]
Message-ID: <f2dcafff-1be7-461f-baab-020f8a06b351@amd.com> (raw)
In-Reply-To: <980a1569-cdae-4343-bd94-4fb2ea6e247b@arm.com>



On 7/2/2025 1:43 PM, Dev Jain wrote:
> 
> On 02/07/25 1:38 pm, Raghavendra K T wrote:
>>
>>
>> On 7/2/2025 12:18 PM, Dev Jain wrote:
>>>
>>> On 02/07/25 12:13 pm, Raghavendra K T wrote:
>>>> The test align_shift_alloc_test is expected to fail.
>>>> Reporting the test as fail confuses to be a genuine failure.
>>>> Introduce widely used xfail sematics to address the issue.
>>>>
>>>> Note: a warn_alloc dump similar to below is still expected:
>>>>
>>>>   Call Trace:
>>>>    <TASK>
>>>>    dump_stack_lvl+0x64/0x80
>>>>    warn_alloc+0x137/0x1b0
>>>>    ? __get_vm_area_node+0x134/0x140
>>>>
>>>> Snippet of dmesg after change:
>>>>
>>>> Summary: random_size_align_alloc_test passed: 1 failed: 0 xfailed: 0 ..
>>>> Summary: align_shift_alloc_test passed: 0 failed: 0 xfailed: 1 ..
>>>> Summary: pcpu_alloc_test passed: 1 failed: 0 xfailed: 0 ..
>>>>
>>>> Signed-off-by: Raghavendra K T <raghavendra.kt@amd.com>
>>>> ---
>>>
>>> Thanks for doing this, been thinking about this for so long but
>>> I'm lazy : )
>>
>> :)
>>
>>>
>>>>   lib/test_vmalloc.c | 36 +++++++++++++++++++++---------------
>>>>   1 file changed, 21 insertions(+), 15 deletions(-)
>>>>
>>>> diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c
>>>> index 1b0b59549aaf..649f352e2046 100644
>>>> --- a/lib/test_vmalloc.c
>>>> +++ b/lib/test_vmalloc.c
>>>> @@ -396,25 +396,27 @@ vm_map_ram_test(void)
>>>>   struct test_case_desc {
>>>>       const char *test_name;
>>>>       int (*test_func)(void);
>>>> +    bool xfail;
>>>>   };
>>>>   static struct test_case_desc test_case_array[] = {
>>>> -    { "fix_size_alloc_test", fix_size_alloc_test },
>>>> -    { "full_fit_alloc_test", full_fit_alloc_test },
>>>> -    { "long_busy_list_alloc_test", long_busy_list_alloc_test },
>>>> -    { "random_size_alloc_test", random_size_alloc_test },
>>>> -    { "fix_align_alloc_test", fix_align_alloc_test },
>>>> -    { "random_size_align_alloc_test", random_size_align_alloc_test },
>>>> -    { "align_shift_alloc_test", align_shift_alloc_test },
>>>> -    { "pcpu_alloc_test", pcpu_alloc_test },
>>>> -    { "kvfree_rcu_1_arg_vmalloc_test", 
>>>> kvfree_rcu_1_arg_vmalloc_test },
>>>> -    { "kvfree_rcu_2_arg_vmalloc_test", 
>>>> kvfree_rcu_2_arg_vmalloc_test },
>>>> -    { "vm_map_ram_test", vm_map_ram_test },
>>>> +    { "fix_size_alloc_test", fix_size_alloc_test, },
>>>> +    { "full_fit_alloc_test", full_fit_alloc_test, },
>>>> +    { "long_busy_list_alloc_test", long_busy_list_alloc_test, },
>>>> +    { "random_size_alloc_test", random_size_alloc_test, },
>>>> +    { "fix_align_alloc_test", fix_align_alloc_test, },
>>>> +    { "random_size_align_alloc_test", random_size_align_alloc_test, },
>>>> +    { "align_shift_alloc_test", align_shift_alloc_test, true },
>>>> +    { "pcpu_alloc_test", pcpu_alloc_test, },
>>>> +    { "kvfree_rcu_1_arg_vmalloc_test", 
>>>> kvfree_rcu_1_arg_vmalloc_test, },
>>>> +    { "kvfree_rcu_2_arg_vmalloc_test", 
>>>> kvfree_rcu_2_arg_vmalloc_test, },
>>>> +    { "vm_map_ram_test", vm_map_ram_test, },
>>>>       /* Add a new test case here. */
>>>>   };
>>>
>>> Why this change?
>>
>> Perhaps not entirely necessary except for align_shift_alloc_test line,
>> still updated the field since one more bool field added. But let me know
>> if you are okay with current state OR need a respin for that?
> 
> Oh now I saw the "true", I thought you were adding commas for no reason.
> 
> I think that's fine then, but will let Uladzislau decide.
> 
> 

Uladzislau,

Do you think this patch would be useful? and above change is okay?

Thanks and regards
- Raghu



  reply	other threads:[~2025-07-04  9:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02  6:43 Raghavendra K T
2025-07-02  6:48 ` Dev Jain
2025-07-02  8:08   ` Raghavendra K T
2025-07-02  8:13     ` Dev Jain
2025-07-04  9:09       ` Raghavendra K T [this message]
2025-07-04 10:05         ` Uladzislau Rezki
2025-07-04 10:06 ` Uladzislau Rezki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2dcafff-1be7-461f-baab-020f8a06b351@amd.com \
    --to=raghavendra.kt@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=dev.jain@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=urezki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox