]>
git.saurik.com Git - apple/xnu.git/blob - tests/shared_cache_reslide_test.c
0c6a498fd6048504f3b484503c1058df986a0f2a
2 #include <darwintest.h>
8 #include <spawn_private.h>
14 #include <sys/spawn_internal.h>
15 #include <sys/sysctl.h>
16 #include <sys/syslimits.h>
17 #include <sys/reason.h>
24 #include <mach-o/dyld.h>
25 #include <mach-o/dyld_priv.h>
28 #define SHARED_CACHE_HELPER "get_shared_cache_address"
29 #define DO_RUSAGE_CHECK "check_rusage_flag"
30 #define DO_DUMMY "dummy"
31 #define ADDRESS_OUTPUT_SIZE 12L
33 #ifndef _POSIX_SPAWN_RESLIDE
34 #define _POSIX_SPAWN_RESLIDE 0x0800
37 #ifndef OS_REASON_FLAG_SHAREDREGION_FAULT
38 #define OS_REASON_FLAG_SHAREDREGION_FAULT 0x400
41 T_GLOBAL_META(T_META_RUN_CONCURRENTLY(true));
44 T_DECL(reslide_sharedcache
, "crash induced reslide of the shared cache",
45 T_META_CHECK_LEAKS(false), T_META_IGNORECRASHES(".*shared_cache_reslide_test.*"),
48 T_SKIP("shared cache reslide is currently only supported on arm64e iPhones");