Add tests for memblock_alloc_node()
authorClaudio Migliorelli <claudio.migliorelli@mail.polimi.it>
Sat, 25 Feb 2023 18:07:11 +0000 (19:07 +0100)
committerMike Rapoport (IBM) <rppt@kernel.org>
Wed, 24 May 2023 08:56:30 +0000 (11:56 +0300)
commitb842f4f55810b5d94dbbdda00f38dce38ec1bbb6
treef5bf9847d618ae39540aeca3149e1bf3e02bff06
parent44c026a73be8038f03dbdeef028b642880cf1511
Add tests for memblock_alloc_node()

This test is aimed at verifying the memblock_alloc_node() to work as
expected, so setting the correct NUMA node for the new allocated
region. The memblock_alloc_node() is called directly without using any
stub. The core check is between the requested NUMA node and the `nid`
field inside the memblock_region structure. These two are supposed to
be equal for the test to succeed.

Signed-off-by: Claudio Migliorelli <claudio.migliorelli@mail.polimi.it>
Link: https://lore.kernel.org/r/ea5e938e-6b74-b188-af59-4b94b18bc0@mail.polimi.it
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
tools/testing/memblock/tests/alloc_nid_api.c