]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-framework-fallback.dtest/main.c
2 // BUILD: $CC main.c -o $BUILD_DIR/dlopen-framework-fallback.exe
4 // RUN: ./dlopen-framework-fallback.exe
13 printf("[BEGIN] dlopen-framework-fallback\n");
15 // Verify dyld will fallback and look for framework in /System/Library/Frameworks/
16 void* handle
= dlopen("/System/Library/BadPath/CoreFoundation.framework/CoreFoundation", RTLD_LAZY
);
17 if ( handle
== NULL
) {
18 printf("dlerror(): %s\n", dlerror());
19 printf("[FAIL] dlopen-framework-fallback\n");
23 // validate handle works to find symbols
24 void* sym
= dlsym(handle
, "CFRetain");
26 printf("dlerror(): %s\n", dlerror());
27 printf("[FAIL] dlopen-framework-fallback\n");
31 printf("[PASS] dlopen-framework-fallback\n");