public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, V2] gas: scfi: fix failing test on Solaris2
@ 2024-02-08  7:10 Indu Bhagat
  2024-02-08  8:09 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Indu Bhagat @ 2024-02-08  7:10 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

[Change from V1]
  - Include a check for --32 as well.
[End of changes from V1]

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.  While at it, also include a similar check for --32 support.

gas/testsuite/
	* gas/scfi/x86_64/scfi-x86-64.exp: Add gas_x32_check and
	gas_32_check.  Conditionalize the execution of affected
	testcases.
---
 gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp | 24 +++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

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..5324af386f8 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,22 @@
 # 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_32_check { } {
+    global NM
+    global NMFLAGS
+
+    set status [gas_host_run "$NM $NMFLAGS --help" ""]
+    return [regexp "targets:.*i386" [lindex $status 1]];
+}
+
+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 +56,12 @@ 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"
 
-    run_list_test "scfi-unsupported-1" "--32 --scfi=experimental"
-    run_list_test "scfi-unsupported-1" "--x32 --scfi=experimental"
+    if { [gas_32_check] } then {
+	run_list_test "scfi-unsupported-1" "--32 --scfi=experimental"
+    }
+    if { [gas_x32_check] } then {
+	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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, V2] gas: scfi: fix failing test on Solaris2
  2024-02-08  7:10 [PATCH, V2] gas: scfi: fix failing test on Solaris2 Indu Bhagat
@ 2024-02-08  8:09 ` Jan Beulich
  2024-02-09  7:25   ` Indu Bhagat
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2024-02-08  8:09 UTC (permalink / raw)
  To: Indu Bhagat; +Cc: binutils

On 08.02.2024 08:10, Indu Bhagat wrote:
> [Change from V1]
>   - Include a check for --32 as well.
> [End of changes from V1]
> 
> 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.  While at it, also include a similar check for --32 support.

Okay.

One further observation (not for this patch, but still related):

> @@ -40,8 +56,12 @@ if  { ([istarget "x86_64-*-*"] && ![istarget "x86_64-*-linux*-gnux32"]) } then {

The condition visible here makes it so that on ix86 targets, no matter
whether they're capable of also producing 64-bit objects (via use of
--64) these tests aren't run, despite scfi being usable there.

Jan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, V2] gas: scfi: fix failing test on Solaris2
  2024-02-08  8:09 ` Jan Beulich
@ 2024-02-09  7:25   ` Indu Bhagat
  0 siblings, 0 replies; 3+ messages in thread
From: Indu Bhagat @ 2024-02-09  7:25 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On 2/8/24 00:09, Jan Beulich wrote:
> On 08.02.2024 08:10, Indu Bhagat wrote:
>> [Change from V1]
>>    - Include a check for --32 as well.
>> [End of changes from V1]
>>
>> 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.  While at it, also include a similar check for --32 support.
> 
> Okay.
> 

This is committed now.
Thanks

> One further observation (not for this patch, but still related):
> 
>> @@ -40,8 +56,12 @@ if  { ([istarget "x86_64-*-*"] && ![istarget "x86_64-*-linux*-gnux32"]) } then {
> 
> The condition visible here makes it so that on ix86 targets, no matter
> whether they're capable of also producing 64-bit objects (via use of
> --64) these tests aren't run, despite scfi being usable there.
> 

OK. I'll look into this one soon.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-09  7:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08  7:10 [PATCH, V2] gas: scfi: fix failing test on Solaris2 Indu Bhagat
2024-02-08  8:09 ` Jan Beulich
2024-02-09  7:25   ` Indu Bhagat

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).