]> git.saurik.com Git - apple/xnu.git/blame - tests/ptrauth_data_tests.c
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tests / ptrauth_data_tests.c
CommitLineData
f427ee49
A
1#include <darwintest.h>
2#include <sys/sysctl.h>
3
4T_GLOBAL_META(T_META_NAMESPACE("xnu.arm"));
5
6T_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}