]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-long-error-message.dtest/main.c
2 // BUILD: $CC main.c -o $BUILD_DIR/dlopen-long-error-message.exe
4 // RUN: ./dlopen-long-error-message.exe
11 #include "test_support.h"
13 int main(int argc
, const char* argv
[], const char* envp
[], const char* apple
[]) {
14 for (int i
=0; i
< 10; ++i
) {
15 void* handle
= dlopen("/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/bogus/path/libbogus.dylib", RTLD_FIRST
);
16 if ( handle
!= NULL
) {
17 FAIL("Should have failed on non-existent file");
20 free(strdup("hello there"));