]> sourceware.org Git - 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>
Mon, 12 Feb 2024 14:49:57 +0000 (06:49 -0800)
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>
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 46f12337571127c67ce190182391357d102e2396..0a9a164a3e8f4610feac60e39cf8c305772bcb92 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 31212453d9374013c371a6560637c25dc9842afd..3dec5623e41dc3c82b0bb649a00c9cfce6ab0984 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 e84087068e6b7b15c06c7844340d7309bd579c9a..249831e816f6589c4040628508feabe6b2f3a968 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
This page took 0.046015 seconds and 5 git commands to generate.