glibc/elf/tst-tls13.c

31 lines
511 B
C
Raw Normal View History

/* Check unloading modules with data in static TLS block. */
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
2007-07-12 20:26:36 +02:00
#include <unistd.h>
static int
do_test (void)
{
2007-07-12 20:26:36 +02:00
for (int i = 0; i < 1000;)
{
printf ("round %d\n",++i);
2007-07-12 20:26:36 +02:00
void *h = dlopen ("$ORIGIN/tst-tlsmod13a.so", RTLD_LAZY);
if (h == NULL)
{
printf ("cannot load: %s\n", dlerror ());
exit (1);
}
dlclose (h);
}
return 0;
}
#define TEST_FUNCTION do_test ()
#define TIMEOUT 3
#include "../test-skeleton.c"