memblock tests: add tests for memblock_trim_memory
authorRebecca Mckeever <remckee0@gmail.com>
Sat, 27 Aug 2022 05:42:50 +0000 (00:42 -0500)
committerMike Rapoport <rppt@linux.ibm.com>
Tue, 30 Aug 2022 10:12:00 +0000 (13:12 +0300)
commitdcd45ad2ad784c35bfba8ae93c285574bc2a8a1e
tree35b43162c0d4805dc8349a3ee75766e84084ce32
parenta541c6d428f775efcfe25236062c96b59e31b57a
memblock tests: add tests for memblock_trim_memory

Add tests for memblock_trim_memory() for the following scenarios:
- all regions aligned
- one unaligned region that is smaller than the alignment
- one unaligned region that is unaligned at the base
- one unaligned region that is unaligned at the end

Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com>
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/0e5f55154a3b66581e04ba3717978795cbc08a5b.1661578349.git.remckee0@gmail.com
tools/testing/memblock/tests/basic_api.c