]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nptl: tests: Fix test-wrapper use in tst-dl-debug-tid.sh
authorYury Khrustalev <yury.khrustalev@arm.com>
Mon, 1 Dec 2025 10:09:14 +0000 (10:09 +0000)
committerYury Khrustalev <yury.khrustalev@arm.com>
Mon, 1 Dec 2025 14:39:39 +0000 (14:39 +0000)
Test wrapper script was used twice: once to run the test
command and second time within the text command which
seems unnecessary and results in false errors when running
this test.

Fixes 332f8e62afef53492dd8285490bcf7aeef18c80a

Reviewed-by: Frédéric Bérat <fberat@redhat.com>
nptl/Makefile
nptl/tst-dl-debug-tid.sh

index 4cb89fd5b5bbb8429190722505e8538765ed0b38..81d6a5482cbb0a1e671c79f5fd472be9e36f59bb 100644 (file)
@@ -708,8 +708,8 @@ tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child
 
 ifeq ($(run-built-tests),yes)
 $(objpfx)tst-dl-debug-tid.out: tst-dl-debug-tid.sh $(objpfx)tst-dl-debug-tid
-       $(SHELL) $< $(common-objpfx) '$(test-wrapper)' '$(rtld-prefix)' \
-         '$(test-wrapper-env)' '$(run-program-env)' \
+       $(SHELL) $< $(common-objpfx) '$(test-wrapper-env)' '$(rtld-prefix)' \
+         '$(run-program-env)' \
          $(objpfx)tst-dl-debug-tid > $@; $(evaluate-test)
 
 $(objpfx)tst-oddstacklimit.out: $(objpfx)tst-oddstacklimit $(objpfx)tst-basic1
index 93d27134a09eaca78377353184c750749d64babd..9ee31ac4f241f0b467c15394691ee176e8f3cf16 100644 (file)
@@ -25,18 +25,17 @@ set -e
 
 # Arguments are from Makefile.
 common_objpfx="$1"
-test_wrapper="$2"
+test_wrapper_env="$2"
 rtld_prefix="$3"
-test_wrapper_env="$4"
-run_program_env="$5"
-test_program="$6"
+run_program_env="$4"
+test_program="$5"
 
 debug_output="${common_objpfx}elf/tst-dl-debug-tid.debug"
 rm -f "${debug_output}".*
 
 # Run the test program with LD_DEBUG=tls.
 eval "${test_wrapper_env}" LD_DEBUG=tls LD_DEBUG_OUTPUT="${debug_output}" \
-    "${test_wrapper}" "${rtld_prefix}" "${test_program}"
+    "${rtld_prefix}" "${test_program}"
 
 debug_output=$(ls "${debug_output}".*)
 # Check for the "Thread starting" message.
@@ -49,9 +48,9 @@ fi
 # Check that we have a message where the PID (from prefix) is different
 # from the TID (in the message). This indicates a worker thread log.
 if ! grep 'Thread starting: TID=' "${debug_output}" | awk -F '[ \t:]+' '{
-  sub(/,/, "", $5);
-  sub(/TID=/, "", $5);
-  if ($1 != $5)
+  sub(/,/, "", $4);
+  sub(/TID=/, "", $4);
+  if ($1 != $4)
     exit 0;
   exit 1
 }'; then