]>
Commit | Line | Data |
---|---|---|
f427ee49 A |
1 | #include <darwintest.h> |
2 | #include <sys/sysctl.h> | |
3 | ||
4 | T_GLOBAL_META(T_META_NAMESPACE("xnu.arm")); | |
5 | ||
6 | T_DECL(ptrauth_data_tests, "invoke the PAC unit tests", T_META_ASROOT(true)) | |
7 | { | |
8 | #if __has_feature(ptrauth_calls) | |
9 | int ret, dummy = 1; | |
10 | ret = sysctlbyname("kern.run_ptrauth_data_tests", NULL, NULL, &dummy, sizeof(dummy)); | |
11 | T_ASSERT_POSIX_SUCCESS(ret, "run ptrauth data tests"); | |
12 | #else | |
13 | T_SKIP("Running on non-ptrauth system. Skipping..."); | |
14 | #endif //__has_feature(ptrauth_calls) | |
15 | } |