]>
git.saurik.com Git - apple/xnu.git/blob - tests/vm/page_size_globals.c
1 #include <darwintest.h>
2 #include <mach/vm_page_size.h>
5 T_META_NAMESPACE("vm_page_size_overrides")
15 T_ASSERT_EQ(page_shift
, expected_shift
, "page_shift");
16 T_ASSERT_EQ(page_size
, 1UL << expected_shift
, "page_size");
17 T_ASSERT_EQ(page_mask
, page_size
- 1, "page_mask");
22 "Can override vm_kernel_page_size",
23 T_META_ENVVAR("VM_KERNEL_PAGE_SIZE_4K=1"),
24 T_META_ENVVAR("MallocGuardEdges=0"),
25 T_META_ENVVAR("MallocDoNotProtectPrelude=1"),
26 T_META_ENVVAR("MallocDoNotProtectPostlude=1"))
28 verify_page_size(12, vm_kernel_page_shift
, vm_kernel_page_size
, vm_kernel_page_mask
);
33 T_META_ENVVAR("VM_KERNEL_PAGE_SIZE_4K=2"),
34 T_META_ENVVAR("VM_KERNEL_PAGE_SIZE=4K"),
35 T_META_ENVVAR("VM_KERNEL_PAGE_SIZE="))
38 * This test just verifies that libkernel_init doesn't
39 * crash when handling invalid overrides.
40 * So if we got here, we can pass the test.
42 T_PASS("Test process spawned");