On 3/5/26 16:01, Lorenzo Stoakes (Oracle) wrote:
> On Thu, Mar 05, 2026 at 02:52:20PM +0100, David Hildenbrand (Arm) wrote:
>> On 3/5/26 11:50, Lorenzo Stoakes (Oracle) wrote:
>>> Now we have helpers which test singular VMA flags - vma_flags_test() and
>>> vma_desc_test() - add a test to explicitly assert that these behave as
>>> expected.
>>>
>>> Signed-off-by: Lorenzo Stoakes (Oracle) <[email protected]>
>>> ---
>>>  tools/testing/vma/tests/vma.c | 36 +++++++++++++++++++++++++++++++++++
>>>  1 file changed, 36 insertions(+)
>>>
>>> diff --git a/tools/testing/vma/tests/vma.c b/tools/testing/vma/tests/vma.c
>>> index f031e6dfb474..1aa94dd7e74a 100644
>>> --- a/tools/testing/vma/tests/vma.c
>>> +++ b/tools/testing/vma/tests/vma.c
>>> @@ -159,6 +159,41 @@ static bool test_vma_flags_word(void)
>>>     return true;
>>>  }
>>>
>>> +/* Ensure that vma_flags_test() and friends works correctly. */
>>> +static bool test_vma_flags_test(void)
>>> +{
>>> +   const vma_flags_t flags = mk_vma_flags(VMA_READ_BIT, VMA_WRITE_BIT,
>>> +                                          VMA_EXEC_BIT, 64, 65);
>>
>> When already using numbers, I was wondering whether you'd want to stick
>> to numbers only here.
> 
> Numbers are for flags > 64 bits, we currently don't define any, it's to make
> sure everything works at higher bitmap sizes, the tests currently set the 
> bitmap
> size to 128 bits.

Right, I was just saying, purely using numbers would also work and make
the numbers 64/65 not stick out as much :)


> 
>>
>>> +   struct vm_area_desc desc;
>>
>>
>> struct vm_area_desc desc = {
>>      .vma_flags = flags,
>> };
>>
>> ?
> 
> Ack can do, fix-patch for Andrew below :)

In case I missed it:

Acked-by: David Hildenbrand (Arm) <[email protected]>

-- 
Cheers,

David

Reply via email to