]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dtrace.dtest/main.c
dyld-851.27.tar.gz
[apple/dyld.git] / testing / test-cases / dtrace.dtest / main.c
1 // if we ever re-enable this on iOS we will need to add // BOOT_ARGS: dtrace_dof_mode=1
2
3 // BUILD(macos): $DTRACE -h -s main.d -o $BUILD_DIR/probes.h
4 // BUILD(macos): $CC main.c -I$BUILD_DIR -o $BUILD_DIR/dtrace.exe $DEPENDS_ON $BUILD_DIR/probes.h
5 // BUILD(macos): $DYLD_ENV_VARS_ENABLE $BUILD_DIR/dtrace.exe
6
7 // BUILD(ios,tvos,watchos,bridgeos):
8
9 // RUN: $SUDO /usr/sbin/dtrace -o /dev/null 2> /dev/null -n 'dyld_testing*:dtrace.exe:main:callback' -c $RUN_DIR/dtrace.exe
10
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <string.h>
14 #include <sys/sdt.h>
15
16 #include "test_support.h"
17
18 #include "probes.h"
19
20
21 int main(int argc, const char* argv[], const char* envp[], const char* apple[]) {
22 DYLD_TESTING_CALLBACK();
23
24 if (!DYLD_TESTING_CALLBACK_ENABLED())
25 FAIL("DYLD_TESTING_CALLBACK_ENABLED() returned false");
26 else
27 PASS("Success");
28 }