]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dtrace.dtest/main.c
237dbd18b383e1c8d312938ba937e1fc77d4fe73
[apple/dyld.git] / testing / test-cases / dtrace.dtest / main.c
1 // BUILD: /usr/sbin/dtrace -h -s main.d -o $TEMP_DIR/probes.h
2 // BUILD: $CC main.c -I$TEMP_DIR -o $BUILD_DIR/dtrace.exe
3 // BUILD: $DYLD_ENV_VARS_ENABLE $BUILD_DIR/dtrace.exe
4
5 // RUN: $SUDO dtrace -l -n 'dyld_testing*:dtrace.exe:main:callback' -c ./dtrace.exe
6
7
8
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <string.h>
12 #include <sys/sdt.h>
13
14 #include "probes.h"
15
16 int main()
17 {
18 printf("[BEGIN] dtrace\n");
19
20 DYLD_TESTING_CALLBACK();
21
22 if (!DYLD_TESTING_CALLBACK_ENABLED())
23 printf("[FAIL] !DYLD_TESTING_CALLBACK_ENABLED\n");
24
25 printf("[PASS] dtrace\n");
26 return 0;
27 }