]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/ukvmem: Use correct stack guard size macro for tests
authorSergiu Moga <sergiu@unikraft.io>
Mon, 3 Feb 2025 09:38:57 +0000 (11:38 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Mon, 3 Feb 2025 16:09:15 +0000 (16:09 +0000)
During the upstreaming of
5587fd88 (lib/ukvmem: Make stack VMA guards size configurable and end-to-end),
following some renames, the macro used
in the tests was not updated as well, which results in build errors for
the ukvmem tests. Fix this by using the proper macro name.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1573

lib/ukvmem/tests/test_vmem.c

index 5fdb81b8c4f3385f4ca5e654b4323886867c7cd0..f74e66954652bfd7aa5cae28d716f41152247ab4 100644 (file)
@@ -639,7 +639,7 @@ UK_TESTCASE(ukvmem, test_vma_stack)
 
        /* Probe the entire stack */
        len = probe_r(va1 - UK_VMA_STACK_BOTTOM_GUARD_SIZE,
-                     VMEM_STACKSIZE + STACK_GUARDS_SIZE);
+                     VMEM_STACKSIZE + UK_VMA_STACK_GUARDS_SIZE);
        UK_TEST_EXPECT_SNUM_EQ(len, VMEM_STACKSIZE);
 
        rc = uk_vma_map_stack(vas, &va2, VMEM_STACKSIZE, 0,
@@ -662,7 +662,7 @@ UK_TESTCASE(ukvmem, test_vma_stack)
 
        /* Probe the entire stack */
        len = probe_r(va2 - UK_VMA_STACK_BOTTOM_GUARD_SIZE,
-                     VMEM_STACKSIZE + STACK_GUARDS_SIZE);
+                     VMEM_STACKSIZE + UK_VMA_STACK_GUARDS_SIZE);
        UK_TEST_EXPECT_SNUM_EQ(len, VMEM_STACKSIZE);
 
        /* Try to unmap only some part of the stack */
@@ -675,7 +675,8 @@ UK_TESTCASE(ukvmem, test_vma_stack)
 
        /* But we should be able to change attributes for the whole VMA */
        rc = uk_vma_set_attr(vas, va2 - UK_VMA_STACK_BOTTOM_GUARD_SIZE,
-                            VMEM_STACKSIZE + STACK_GUARDS_SIZE, PROT_R, 0);
+                            VMEM_STACKSIZE + UK_VMA_STACK_GUARDS_SIZE,
+                            PROT_R, 0);
        UK_TEST_EXPECT_ZERO(rc);
 
        vas_clean(vas);