Re: [PATCH v2] selftests/mm: Simplify byte pattern checking in mremap_test
From: David Hildenbrand (Arm)
Date: Wed Apr 15 2026 - 05:26:09 EST
On 4/15/26 11:16, David Laight wrote:
> On Wed, 15 Apr 2026 14:05:01 +0530
> Dev Jain <dev.jain@xxxxxxx> wrote:
>
> ...
>>>
>>> c) Remove any randomization from the test. There is no need for random
>>> patterns, just fill pages with increasing numbers.
>>
>> Agreed.
>
> I'd start from (say) 0x123456789abcdef0 rather than zero to avoid lots
> of zero bytes.
I'd just initialize the first page with (unsigned int) 0's, the second
page with (unsigned int) 1's etc.
mremap only moved full pages, so it would even be sufficient to only
check the first (unsigned int) in a page. But obviously, just comparing
full pages might be easier.
--
Cheers,
David