• Lorenzo Stoakes's avatar
    tools: add VMA merge tests · 955db396
    Lorenzo Stoakes authored
    Add a variety of VMA merge unit tests to assert that the behaviour of VMA
    merge is correct at an abstract level and VMAs are merged or not merged as
    expected.
    
    These are intentionally added _before_ we start refactoring vma_merge() in
    order that we can continually assert correctness throughout the rest of
    the series.
    
    In order to reduce churn going forward, we backport the vma_merge_struct
    data type to the test code which we introduce and use in a future commit,
    and add wrappers around the merge new and existing VMA cases.
    
    Link: https://lkml.kernel.org/r/1c7a0b43cfad2c511a6b1b52f3507696478ff51a.1725040657.git.lorenzo.stoakes@oracle.comSigned-off-by: default avatarLorenzo Stoakes <lorenzo.stoakes@oracle.com>
    Reviewed-by: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Bert Karwatzki <spasswolf@web.de>
    Cc: Jeff Xu <jeffxu@chromium.org>
    Cc: Jiri Olsa <olsajiri@gmail.com>
    Cc: Kees Cook <kees@kernel.org>
    Cc: Lorenzo Stoakes <lstoakes@gmail.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: "Paul E. McKenney" <paulmck@kernel.org>
    Cc: Paul Moore <paul@paul-moore.com>
    Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    955db396
vma.c 37.1 KB