public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: Indu Bhagat <indu.bhagat@oracle.com>
Subject: [PATCH] gas: scfi: fix failing test on Solaris2
Date: Fri,  2 Feb 2024 15:25:42 -0800	[thread overview]
Message-ID: <20240202232542.2282432-1-indu.bhagat@oracle.com> (raw)

It has been observed that the run of scfi-unsupported-1 test with --x32
arg on a Solaris2 x86_64 system fails:

Executing on host: sh -c {../as-new  --x32 --scfi=experimental <...>/scfi-unsupported-1.s 2>&1}  /dev/null dump.out (timeout = 300)
spawn [open ...]
Assembler messages:
Fatal error: no compiled in support for 32bit x86_64
regexp_diff match failure
regexp "^Fatal error: SCFI is not supported for this ABI$"
line   "Fatal error: no compiled in support for 32bit x86_64"
FAIL: x86_64 scfi-unsupported-1

Fix the above by adding a check for --x32 support before running the
test.

gas/testsuite/
	* gas/scfi/x86_64/scfi-x86-64.exp: Add gas_x32_check and
	conditionalize the execution of scfi-unsupported-1 on it.
---
 gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp b/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp
index 9c76974fefe..415c82e5c85 100644
--- a/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp
+++ b/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp
@@ -14,6 +14,14 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 
+proc gas_x32_check { } {
+    global NM
+    global NMFLAGS
+
+    set status [gas_host_run "$NM $NMFLAGS --help" ""]
+    return [regexp "targets:.*elf32-x86-64" [lindex $status 1]];
+}
+
 if { ![is_elf_format] } then {
     return
 }
@@ -40,8 +48,11 @@ if  { ([istarget "x86_64-*-*"] && ![istarget "x86_64-*-linux*-gnux32"]) } then {
     run_list_test "scfi-fp-diag-2" "--scfi=experimental"
     run_list_test "scfi-diag-2" "--scfi=experimental"
 
+    if { [gas_x32_check] } then {
+	run_list_test "scfi-unsupported-1" "--x32 --scfi=experimental"
+    }
     run_list_test "scfi-unsupported-1" "--32 --scfi=experimental"
-    run_list_test "scfi-unsupported-1" "--x32 --scfi=experimental"
+
     run_list_test "scfi-unsupported-insn-1" "--scfi=experimental"
     run_list_test "scfi-unsupported-2" "--scfi=experimental"
     run_list_test "scfi-unsupported-3" "--scfi=experimental"
-- 
2.43.0


             reply	other threads:[~2024-02-02 23:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 23:25 Indu Bhagat [this message]
2024-02-05  7:32 ` Jan Beulich
2024-02-05 22:39   ` Indu Bhagat
2024-02-06  8:30     ` Jan Beulich

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=20240202232542.2282432-1-indu.bhagat@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=binutils@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).