xref: /xnu-8796.121.2/tests/test_utils.h (revision c54f35ca767986246321eb901baf8f5ff7923f6a)
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