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.

> +     struct vm_area_desc desc;


struct vm_area_desc desc = {
        .vma_flags = flags,
};

?


-- 
Cheers,

David

Reply via email to