[glibc] Revert "strace-tst-thp.sh: Allow unsupported THP tests"

"H.J. Lu via Glibc-cvs" <[email protected]> Wed, 15 Jul 2026 22:16:21 +0000 (GMT)
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=af51ed63d094a056486b932b0585ee5893d19b6f

commit af51ed63d094a056486b932b0585ee5893d19b6f
Author: H.J. Lu <[email protected]>
Date:   Thu Jul 16 06:15:44 2026 +0800

    Revert "strace-tst-thp.sh: Allow unsupported THP tests"
    
    This reverts commit ea50bcc538f3e161dd589b4a855d80ef8a35fce8.

Diff:
---
 sysdeps/unix/sysv/linux/strace-tst-thp.sh | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/strace-tst-thp.sh b/sysdeps/unix/sysv/linux/strace-tst-thp.sh
index 0ad10c3ac2..bff7d3e7a0 100644
--- a/sysdeps/unix/sysv/linux/strace-tst-thp.sh
+++ b/sysdeps/unix/sysv/linux/strace-tst-thp.sh
@@ -23,9 +23,6 @@ rtld="$1"
 test_wrapper_env="$2"
 run_program_env="$3"
 test_prog="$4"
-output=${test_prog}.$$
-
-trap "rm -f ${output}" EXIT
 
 cmd="${test_wrapper_env} ${run_program_env} strace -X raw ${rtld} ${test_prog}"
 
@@ -48,19 +45,18 @@ esac
 
 # Finally the actual test inside the test environment, using the just
 # build ld.so and new libraries to run the THP test under strace.
-/bin/sh -c \
-  "timeout -k 4 $((3*$TIMEOUTFACTOR)) ${cmd} --direct 2>&1" > "${output}"
-if grep -E "madvise\(0x[0-9a-f]+, [0-9]+, 0xe)" "${output}"; then
+if /bin/sh -c \
+  "timeout -k 4 $((3*$TIMEOUTFACTOR)) ${cmd} --direct 2>&1 \
+   | grep -E \"madvise\(0x[0-9a-f]+, [0-9]+, 0xe)\""; then
   if test ${strace_expected} = yes; then
-    status=0
+    exit 0
   else
-    status=1
+    exit 1
   fi
 else
   if test ${strace_expected} = no; then
-    status=0
+    exit 0
   else
-    status=1
+    exit 1
   fi
 fi
-exit ${status}