xref: /xnu-10002.41.9/tests/jumbo_va_spaces_28530648.c (revision 699cd48037512bf4380799317ca44ca453c82f57)
1*699cd480SApple OSS Distributions #include <stdio.h>
2*699cd480SApple OSS Distributions #include <errno.h>
3*699cd480SApple OSS Distributions #include <string.h>
4*699cd480SApple OSS Distributions #include <unistd.h>
5*699cd480SApple OSS Distributions #include <sys/mman.h>
6*699cd480SApple OSS Distributions 
7*699cd480SApple OSS Distributions #include <darwintest.h>
8*699cd480SApple OSS Distributions #include <darwintest_utils.h>
9*699cd480SApple OSS Distributions 
10*699cd480SApple OSS Distributions #include "jumbo_va_spaces_common.h"
11*699cd480SApple OSS Distributions 
12*699cd480SApple OSS Distributions T_GLOBAL_META(
13*699cd480SApple OSS Distributions 	T_META_NAMESPACE("xnu.vm"),
14*699cd480SApple OSS Distributions 	T_META_RADAR_COMPONENT_NAME("xnu"),
15*699cd480SApple OSS Distributions 	T_META_RADAR_COMPONENT_VERSION("VM"),
16*699cd480SApple OSS Distributions 	T_META_RUN_CONCURRENTLY(true));
17*699cd480SApple OSS Distributions 
18*699cd480SApple OSS Distributions T_DECL(TESTNAME,
19*699cd480SApple OSS Distributions 	"Verify that a required entitlement is present in order to be granted an extra-large "
20*699cd480SApple OSS Distributions 	"VA space on arm64",
21*699cd480SApple OSS Distributions 	T_META_CHECK_LEAKS(false))
22*699cd480SApple OSS Distributions {
23*699cd480SApple OSS Distributions 	if (!dt_64_bit_kernel()) {
24*699cd480SApple OSS Distributions 		T_SKIP("This test is only applicable to arm64");
25*699cd480SApple OSS Distributions 	}
26*699cd480SApple OSS Distributions 
27*699cd480SApple OSS Distributions #if defined(ENTITLED)
28*699cd480SApple OSS Distributions 	verify_jumbo_va(true);
29*699cd480SApple OSS Distributions #else
30*699cd480SApple OSS Distributions 	verify_jumbo_va(false);
31*699cd480SApple OSS Distributions #endif
32*699cd480SApple OSS Distributions }
33