Remove trailing newline from date_fmt in Serbian locales [BZ #19581]
[glibc.git] / elf / tst-nodelete2.c
blob388e8afb3223dcf3ffec4517cab305a5334db9a7
1 #include "../dlfcn/dlfcn.h"
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <gnu/lib-names.h>
6 static int
7 do_test (void)
9 int result = 0;
11 printf ("\nOpening pthread library.\n");
12 void *pthread = dlopen (LIBPTHREAD_SO, RTLD_LAZY);
14 /* This is a test for correct DF_1_NODELETE clearing when dlopen failure
15 happens. We should clear DF_1_NODELETE for failed library only, because
16 doing this for others (e.g. libpthread) might cause them to be unloaded,
17 that may lead to some global references (e.g. __rtld_lock_unlock) to be
18 broken. The dlopen should fail because of undefined symbols in shared
19 library, that cause DF_1_NODELETE to be cleared. For libpthread, this
20 flag should be set, because if not, SIGSEGV will happen in dlclose. */
21 if (dlopen ("tst-nodelete2mod.so", RTLD_NOW) != NULL)
23 printf ("Unique symbols test failed\n");
24 result = 1;
27 if (pthread)
28 dlclose (pthread);
30 if (result == 0)
31 printf ("SUCCESS\n");
33 return result;
36 #define TEST_FUNCTION do_test ()
37 #include "../test-skeleton.c"