UEFIStarter
a simple UEFI framework
Functions

Tests for the memory allocation tracker. More...

#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <UEFIStarter/core.h>
#include <UEFIStarter/tests/tests.h>

Functions

void test_page_tracking ()
 Makes sure memory page tracking works. More...
 
void test_pool_tracking ()
 Makes sure pool memory tracking works. More...
 
BOOLEAN run_memory_tests ()
 Test runner for this group. More...
 

Detailed Description

Tests for the memory allocation tracker.

Author
Richard Nusser
License
GPLv3 (see http://www.gnu.org/licenses/)
See also
https://github.com/rinusser/UEFIStarter

Function Documentation

◆ test_page_tracking()

void test_page_tracking ( )

Makes sure memory page tracking works.

Test:

stopping the memory tracker with unfreed tracked pages results in a logged error

freeing tracked pages twice shouldn't work and result in a logged error

stopping the memory tracker with unfreed untracked pages should not log an error

◆ test_pool_tracking()

void test_pool_tracking ( )

Makes sure pool memory tracking works.

Test:
free_pool_memory_entries() should return the number of freed pool memory entries

◆ run_memory_tests()

BOOLEAN run_memory_tests ( )

Test runner for this group.

Gets called via the generated test runner.

Returns
whether the test group was executed