]> git.saurik.com Git - apple/xnu.git/blobdiff - tests/kdebug.c
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tests / kdebug.c
index 6aacdccc04aa0a52ebc58535ab9a0875dd888a80..e6de871d95104592158000b737c211d3bd05d135 100644 (file)
@@ -19,6 +19,7 @@
 #include <stdint.h>
 
 #include "ktrace_helpers.h"
 #include <stdint.h>
 
 #include "ktrace_helpers.h"
+#include "test_utils.h"
 
 T_GLOBAL_META(
        T_META_NAMESPACE("xnu.ktrace"),
 
 T_GLOBAL_META(
        T_META_NAMESPACE("xnu.ktrace"),
@@ -623,25 +624,6 @@ static const uint32_t noprocfilt_evts[EXP_KERNEL_EVENTS] = {
        BSDDBG_CODE(DBG_BSD_KDEBUG_TEST, 19),
 };
 
        BSDDBG_CODE(DBG_BSD_KDEBUG_TEST, 19),
 };
 
-static bool
-is_development_kernel(void)
-{
-       static dispatch_once_t is_development_once;
-       static bool is_development;
-
-       dispatch_once(&is_development_once, ^{
-               int dev;
-               size_t dev_size = sizeof(dev);
-
-               T_QUIET;
-               T_ASSERT_POSIX_SUCCESS(sysctlbyname("kern.development", &dev,
-               &dev_size, NULL, 0), NULL);
-               is_development = (dev != 0);
-       });
-
-       return is_development;
-}
-
 static void
 expect_event(struct trace_point *tp, const char *name, unsigned int *events,
     const uint32_t *event_ids, size_t event_ids_len)
 static void
 expect_event(struct trace_point *tp, const char *name, unsigned int *events,
     const uint32_t *event_ids, size_t event_ids_len)