tst-tls13.c 489 B

123456789101112131415161718192021222324252627282930
  1. /* Check unloading modules with data in static TLS block. */
  2. #include <dlfcn.h>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. static int
  6. do_test (void)
  7. {
  8. int i;
  9. for (i = 0; i < 1000;)
  10. {
  11. printf ("round %d\n",++i);
  12. void *h = dlopen ("tst-tlsmod13a.so", RTLD_LAZY);
  13. if (h == NULL)
  14. {
  15. printf ("cannot load: %s\n", dlerror ());
  16. exit (1);
  17. }
  18. dlclose (h);
  19. }
  20. return 0;
  21. }
  22. #define TEST_FUNCTION do_test ()
  23. #define TIMEOUT 20
  24. #include "../test-skeleton.c"