nptl: Rename tst-execstack to tst-execstack-threads
authorFlorian Weimer <fweimer@redhat.com>
Mon, 20 Nov 2023 08:22:21 +0000 (09:22 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 20 Nov 2023 08:22:21 +0000 (09:22 +0100)
So that the test is harder to confuse with elf/tst-execstack
(although the tests are supposed to be the same).

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/tst-execstack.c
nptl/Makefile
nptl/tst-execstack-mod.c [deleted file]
nptl/tst-execstack-threads-mod.c [new file with mode: 0644]
nptl/tst-execstack-threads.c [new file with mode: 0644]
nptl/tst-execstack.c [deleted file]

index 7e898b4f58f94e3d7a30bffc51f3ce6453298707..560b3539180006fe66d1793752171faf498d9eab 100644 (file)
@@ -137,7 +137,12 @@ do_test (void)
 #endif
 
   /* Loading this module should force stacks to become executable.  */
-  void *h = dlopen ("tst-execstack-mod.so", RTLD_LAZY);
+#if USE_PTHREADS
+  const char *soname = "tst-execstack-threads-mod.so";
+#else
+  const char *soname = "tst-execstack-mod.so";
+#endif
+  void *h = dlopen (soname, RTLD_LAZY);
   if (h == NULL)
     {
       printf ("cannot load: %s\n", dlerror ());
index d969419af7aa495d3ebb06d7376d6254afe4afbb..015295e45c06188d7b7a88b1764e6f716ab68034 100644 (file)
@@ -466,7 +466,7 @@ tests-internal += \
   tst-tls5 \
   # tests-internal
 ifeq ($(have-z-execstack),yes)
-tests += tst-execstack
+tests += tst-execstack-threads
 endif
 endif
 
@@ -474,7 +474,7 @@ modules-names = \
   tst-audit-threads-mod1 \
   tst-audit-threads-mod2 \
   tst-compat-forwarder-mod \
-  tst-execstack-mod \
+  tst-execstack-threads-mod \
   tst-stack4mod \
   tst-tls3mod \
   tst-tls5mod \
@@ -669,9 +669,9 @@ endif
 
 tst-exec4-ARGS = $(host-test-program-cmd)
 
-$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
-LDFLAGS-tst-execstack = -Wl,-z,noexecstack
-CFLAGS-tst-execstack-mod.c += -Wno-trampolines
+$(objpfx)tst-execstack-threads.out: $(objpfx)tst-execstack-threads-mod.so
+LDFLAGS-tst-execstack-threads = -Wl,-z,noexecstack
+CFLAGS-tst-execstack-threads-mod.c += -Wno-trampolines
 
 tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
 tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
diff --git a/nptl/tst-execstack-mod.c b/nptl/tst-execstack-mod.c
deleted file mode 100644 (file)
index 5b9812c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../elf/tst-execstack-mod.c"
diff --git a/nptl/tst-execstack-threads-mod.c b/nptl/tst-execstack-threads-mod.c
new file mode 100644 (file)
index 0000000..5b9812c
--- /dev/null
@@ -0,0 +1 @@
+#include "../elf/tst-execstack-mod.c"
diff --git a/nptl/tst-execstack-threads.c b/nptl/tst-execstack-threads.c
new file mode 100644 (file)
index 0000000..6e45c1a
--- /dev/null
@@ -0,0 +1,2 @@
+#define USE_PTHREADS 1
+#include "../elf/tst-execstack.c"
diff --git a/nptl/tst-execstack.c b/nptl/tst-execstack.c
deleted file mode 100644 (file)
index 6e45c1a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#define USE_PTHREADS 1
-#include "../elf/tst-execstack.c"