]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86/cet: fix shadow stack test scripts
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 5 Feb 2024 20:22:39 +0000 (15:22 -0500)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 19 Aug 2025 22:39:23 +0000 (15:39 -0700)
Some shadow stack test scripts use the '==' operator with the 'test'
command to validate exit codes resulting in the following error:

  sysdeps/x86_64/tst-shstk-legacy-1e.sh: 31: test: 139: unexpected operator

The '==' operator is invalid for the 'test' command, use '-eq' like the
previous call to 'test'.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 155bb9d036646138348fee0ac045de601811e0c5)

sysdeps/x86_64/tst-shstk-legacy-1e-static.sh
sysdeps/x86_64/tst-shstk-legacy-1e.sh
sysdeps/x86_64/tst-shstk-legacy-1g.sh

index 008c50dae3193b29b9d97fb28116235dd223a644..b0bb7150b84fa40435172af2c1e83da1800598f4 100755 (executable)
@@ -26,7 +26,7 @@ ${common_objpfx}elf/tst-shstk-legacy-1e-static
 status=$?
 if test $status -eq 77; then
   exit 77
-elif test $status == 139; then
+elif test $status -eq 139; then
   exit 0
 else
   exit 1
index 82f2acbf75d9936a6bc21de56e8bdc41a37c5004..4080b277c2067a3c6cf28348be281dc8df179f35 100755 (executable)
@@ -28,7 +28,7 @@ ${test_program_prefix} \
 status=$?
 if test $status -eq 77; then
   exit 77
-elif test $status == 139; then
+elif test $status -eq 139; then
   exit 0
 else
   exit 1
index 261eef7cacd6e56183bf080f964d34b9ffcafbcf..878e360ba3d9081279c42843c42c2b98e2570e0a 100755 (executable)
@@ -28,7 +28,7 @@ ${test_program_prefix} \
 status=$?
 if test $status -eq 77; then
   exit 77
-elif test $status == 139; then
+elif test $status -eq 139; then
   exit 0
 else
   exit 1