]> git.saurik.com Git - apple/xnu.git/blobdiff - tools/tests/darwintests/perf_kdebug.c
xnu-4570.1.46.tar.gz
[apple/xnu.git] / tools / tests / darwintests / perf_kdebug.c
index 1dc98d8023530f6cee2abf7693b2953537740479..f0f058fbdafaf5a76208265ba751d03c576c6b04 100644 (file)
@@ -117,7 +117,12 @@ static void loop_getppid(dt_stat_time_t s) {
        } while (!dt_stat_stable(s));
 }
 
+static void reset_kdebug_trace(void) {
+       _sysctl_reset();
+}
+
 static void test(const char* test_name, void (^pretest_setup)(void), void (*test)(dt_stat_time_t s)) {
+       T_ATEND(reset_kdebug_trace);
        _sysctl_reset();
        _sysctl_setbuf(1000000);
        _sysctl_nowrap(false);
@@ -129,7 +134,6 @@ static void test(const char* test_name, void (^pretest_setup)(void), void (*test
 
        test(s);
 
-       _sysctl_reset();
        dt_stat_finalize(s);
 }