]> sourceware.org Git - glibc.git/commitdiff
nptl: Convert tst-sem11 and tst-sem12 tests to use the test driver
authorMaciej W. Rozycki <macro@redhat.com>
Thu, 11 Jul 2024 13:17:20 +0000 (14:17 +0100)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Fri, 12 Jul 2024 18:41:08 +0000 (20:41 +0200)
Fix an issue with commit 2af4e3e5668f ("Test of semaphores.") by making
the tst-sem11 and tst-sem12 tests use the test driver, preventing them
from ever causing testing to hang forever and never complete, such as
currently happening with the 'mips-linux-gnu' (o32 ABI) target.  Adjust
the name of the PREPARE macro, which clashes with the interpretation of
its presence by the test driver, by using a TF_ prefix in reference to
the name of the 'tf' function.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
nptl/tst-sem11.c
nptl/tst-sem12.c

index 891e37a860f394ab729a8c71e58cdbdaad15ff9b..a82bb737d5af2056ca392ffe65a1daf9d6aca136 100644 (file)
 static void *
 tf (void *arg)
 {
-#ifdef PREPARE
-  PREPARE
+#ifdef TF_PREPARE
+  TF_PREPARE
 #endif
   SEM_WAIT (arg);
   return NULL;
 }
 
 int
-main (void)
+do_test (void)
 {
   int tries = 5;
   pthread_t th;
@@ -101,3 +101,5 @@ main (void)
 
   return 0;
 }
+
+#include <support/test-driver.c>
index a9843524d2ea840fe00e990c6856feb674443cfc..d4e22d9a8e7ff078c57904c3db1a53af8e66a172 100644 (file)
@@ -20,7 +20,7 @@
 #include <sys/time.h>
 
 
-#define PREPARE \
+#define TF_PREPARE \
   struct timespec ts; \
   struct timeval tv; \
   gettimeofday (&tv, NULL); \
This page took 0.044148 seconds and 5 git commands to generate.