Skip to content

Commit

Permalink
tests: mem_map: fix memory exhaustion test on qemu_x86_tiny
Browse files Browse the repository at this point in the history
The test_k_mem_map_unmap test requires some free physical pages
to work correctly. On qemu_x86_tiny, the physical memory is
artificially limited to test demand paging, which is 320KB as
of writing of this commit message. We also reserve 128KB of
physical memory as swapping area. And we do pin quite lot of
text and data (relatively speaking) in memory. There is not
much memory left for the test. So lower the amount of reserved
memory for paging to leave some pages for the test.

Signed-off-by: Daniel Leung <[email protected]>
  • Loading branch information
dcpleung authored and nashif committed Oct 15, 2024
1 parent 405c671 commit bda38f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/kernel/mem_protect/mem_map/boards/qemu_x86_tiny.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2024 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0

# Adjust this so that test_k_mem_map_unmap memory exhaustion
# test can run without failure, as we may run of free pages
# when there are changes in code and data size.
CONFIG_DEMAND_PAGING_PAGE_FRAMES_RESERVE=30

0 comments on commit bda38f0

Please sign in to comment.