xref: /xnu-8796.141.3/tests/test_utils.h (revision 1b191cb58250d0705d8a51287127505aa4bc0789)
1 #ifndef XNU_DARWINTEST_UTILS_H
2 #define XNU_DARWINTEST_UTILS_H
3 
4 #include <stdbool.h>
5 
6 /* Misc. utility functions for writing darwintests. */
7 bool is_development_kernel(void);
8 
9 /* Launches the given helper variant as a managed process. */
10 pid_t launch_background_helper(
11 	const char* variant,
12 	bool start_suspended,
13 	bool memorystatus_managed);
14 /*
15  * Set the process's managed bit, so that the memorystatus subsystem treats
16  * this process like an app instead of a sysproc.
17  */
18 void set_process_memorystatus_managed(pid_t pid);
19 
20 #define XNU_T_META_SOC_SPECIFIC T_META_TAG("SoCSpecific")
21 
22 #endif /* XNU_DARWINTEST_UTILS_H */
23