Hi David!

On 10/1/26 5:24 PM, David Hildenbrand (Arm) wrote:
> On 9/24/26 07:00, Sarthak Sharma wrote:
>> In the test mremap_move_multiple_vmas(), pages 4
>> to 6 form a single VMA. But the helper function
>> is_multiple_vma_range_ok() checks pages 4 and 5 as
>> one range and treats page 6 separately.
>>
>> Check all three pages as a single range and skip
>> the page 6 iteration to match the actual VMA layout.
>>
>> Fixes: d53f248258e1 ("tools/testing/selftests: extend mremap_test to test 
>> multi-VMA mremap")
>> Signed-off-by: Sarthak Sharma <[email protected]>
>> ---
>>  tools/testing/selftests/mm/mremap_test.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/mm/mremap_test.c 
>> b/tools/testing/selftests/mm/mremap_test.c
>> index ba9b7f7566d0..869df22d46db 100644
>> --- a/tools/testing/selftests/mm/mremap_test.c
>> +++ b/tools/testing/selftests/mm/mremap_test.c
>> @@ -373,7 +373,10 @@ static bool is_multiple_vma_range_ok(unsigned int 
>> pattern_seed,
>>      for (i = 0; i <= 10; i += 2) {
>>              int j;
>>              char *buf = &ptr[i * page_size];
>> -            size_t size = i == 4 ? 2 * page_size : page_size;
>> +            size_t size = i == 4 ? 3 * page_size : page_size;
>> +
>> +            if (i == 6)
>> +                    continue;
>>  
>>              for (j = 0; j < size; j++) {
>>                      char chr = rand();
> 
> What is the impact of this that it warrants a Fixes? Will the test fail?

I read through this again, and realized it is just populating and
validating parts of one VMA in two iterations, which is not wrong, just
a bit odd since others VMAs were being validated in one go. I think I'd
gotten confused with the layout and pictured something else :).

So you're right, this doesn't require a Fixes tag. Infact I think I'll
drop this patch altogether since it is validating stuff correctly.


Reply via email to