tools: testing: add expand-only mode VMA test
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Thu, 17 Oct 2024 14:31:46 +0000 (15:31 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 29 Oct 2024 04:40:40 +0000 (21:40 -0700)
commite8133a77999f650495dca9669c49f143d70bb4f6
tree8c247c7adbb0d2abc8d6905c3a9db32787033b45
parentc4d91e225ff3c9821c85ac6efd8e02c0025c0190
tools: testing: add expand-only mode VMA test

Add a test to assert that VMG_FLAG_JUST_EXPAND functions as expected - that
is, when the VMA iterator is positioned at the previous VMA and no VMAs
proceed it, we observe an expansion with all state as expected.

Explicitly place a prior VMA that would otherwise fail this test if the
mode were not enabled (as it would traverse to the previous-previous VMA).

Link: https://lkml.kernel.org/r/d2f88330254a6448092412bf7dfe077a579ab0dc.1729174352.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Jann Horn <jannh@google.com>
Cc: kernel test robot <oliver.sang@intel.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/vma/vma.c