From: Michael Jeanson <mjeanson@efficios.com>
To: libc-alpha@sourceware.org
Cc: Michael Jeanson <mjeanson@efficios.com>
Subject: [PATCH] x86/cet: fix shadow stack test scripts
Date: Mon, 5 Feb 2024 15:22:39 -0500 [thread overview]
Message-ID: <20240205202239.825075-1-mjeanson@efficios.com> (raw)
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'.
Change-Id: Ib4d444cc1c9bbb9626d5ab3a40a427faf3567e12
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
---
sysdeps/x86_64/tst-shstk-legacy-1e-static.sh | 2 +-
sysdeps/x86_64/tst-shstk-legacy-1e.sh | 2 +-
sysdeps/x86_64/tst-shstk-legacy-1g.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh
index 46f1233757..0a9a164a3e 100755
--- a/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh
+++ b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh
@@ -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
diff --git a/sysdeps/x86_64/tst-shstk-legacy-1e.sh b/sysdeps/x86_64/tst-shstk-legacy-1e.sh
index 31212453d9..3dec5623e4 100755
--- a/sysdeps/x86_64/tst-shstk-legacy-1e.sh
+++ b/sysdeps/x86_64/tst-shstk-legacy-1e.sh
@@ -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
diff --git a/sysdeps/x86_64/tst-shstk-legacy-1g.sh b/sysdeps/x86_64/tst-shstk-legacy-1g.sh
index e84087068e..249831e816 100755
--- a/sysdeps/x86_64/tst-shstk-legacy-1g.sh
+++ b/sysdeps/x86_64/tst-shstk-legacy-1g.sh
@@ -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
--
2.34.1
next reply other threads:[~2024-02-05 20:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 20:22 Michael Jeanson [this message]
2024-02-06 2:10 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240205202239.825075-1-mjeanson@efficios.com \
--to=mjeanson@efficios.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).