public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [testsuite] [arm] test board cflags in multilib.exp
@ 2024-06-07  4:47 Alexandre Oliva
  2024-06-11 14:43 ` Richard Earnshaw (lists)
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Oliva @ 2024-06-07  4:47 UTC (permalink / raw)
  To: gcc-patches
  Cc: Rainer Orth, Mike Stump, Nick Clifton, Richard Earnshaw,
	Ramana Radhakrishnan


multilib.exp tests for multilib-altering flags in a board's
multilib_flags and skips the test, but if such flags appear in the
board's cflags, with the same distorting effects on tested multilibs,
we fail to skip the test.

Extend the skipping logic to board's cflags as well.

Regstrapping on x86_64-linux-gnu.  Already tested on arm-eabi (gcc-13
and trunk).  Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.target/arm/multilib.exp: Skip based on board cflags too.
---
 gcc/testsuite/gcc.target/arm/multilib.exp |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp
index 4442d5d754bd6..12c93bc89d222 100644
--- a/gcc/testsuite/gcc.target/arm/multilib.exp
+++ b/gcc/testsuite/gcc.target/arm/multilib.exp
@@ -18,13 +18,15 @@ load_lib gcc-dg.exp
 
 dg-init
 
-if { [board_info [target_info name] exists multilib_flags] 
-     && [regexp {(-marm|-mthumb|-march=.*|-mcpu=.*|-mfpu=.*|-mfloat=abi=.*)\y} [board_info [target_info name] multilib_flags]] } {
+foreach flagsvar {multilib_flags cflags} {
+  if { [board_info [target_info name] exists $flagsvar] 
+     && [regexp {(-marm|-mthumb|-march=.*|-mcpu=.*|-mfpu=.*|-mfloat=abi=.*)\y} [board_info [target_info name] $flagsvar]] } {
 	
     # Multilib flags override anything we can apply to a test, so
     # skip if any of the above options are set there.
-    verbose "skipping multilib tests due to multilib_flags setting" 1
+    verbose "skipping multilib tests due to $flagsvar setting" 1
     return
+  }
 }
 
 # We don't want to run this test multiple times in a parallel make check.

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

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

* Re: [PATCH] [testsuite] [arm] test board cflags in multilib.exp
  2024-06-07  4:47 [PATCH] [testsuite] [arm] test board cflags in multilib.exp Alexandre Oliva
@ 2024-06-11 14:43 ` Richard Earnshaw (lists)
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw (lists) @ 2024-06-11 14:43 UTC (permalink / raw)
  To: Alexandre Oliva, gcc-patches
  Cc: Rainer Orth, Mike Stump, Nick Clifton, Ramana Radhakrishnan

On 07/06/2024 05:47, Alexandre Oliva wrote:
> 
> multilib.exp tests for multilib-altering flags in a board's
> multilib_flags and skips the test, but if such flags appear in the
> board's cflags, with the same distorting effects on tested multilibs,
> we fail to skip the test.
> 
> Extend the skipping logic to board's cflags as well.
> 
> Regstrapping on x86_64-linux-gnu.  Already tested on arm-eabi (gcc-13
> and trunk).  Ok to install?
> 

OK, thanks.

R.

> 
> for  gcc/testsuite/ChangeLog
> 
> 	* gcc.target/arm/multilib.exp: Skip based on board cflags too.
> ---
>  gcc/testsuite/gcc.target/arm/multilib.exp |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp
> index 4442d5d754bd6..12c93bc89d222 100644
> --- a/gcc/testsuite/gcc.target/arm/multilib.exp
> +++ b/gcc/testsuite/gcc.target/arm/multilib.exp
> @@ -18,13 +18,15 @@ load_lib gcc-dg.exp
>  
>  dg-init
>  
> -if { [board_info [target_info name] exists multilib_flags] 
> -     && [regexp {(-marm|-mthumb|-march=.*|-mcpu=.*|-mfpu=.*|-mfloat=abi=.*)\y} [board_info [target_info name] multilib_flags]] } {
> +foreach flagsvar {multilib_flags cflags} {
> +  if { [board_info [target_info name] exists $flagsvar] 
> +     && [regexp {(-marm|-mthumb|-march=.*|-mcpu=.*|-mfpu=.*|-mfloat=abi=.*)\y} [board_info [target_info name] $flagsvar]] } {
>  	
>      # Multilib flags override anything we can apply to a test, so
>      # skip if any of the above options are set there.
> -    verbose "skipping multilib tests due to multilib_flags setting" 1
> +    verbose "skipping multilib tests due to $flagsvar setting" 1
>      return
> +  }
>  }
>  
>  # We don't want to run this test multiple times in a parallel make check.
> 


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

end of thread, other threads:[~2024-06-11 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-07  4:47 [PATCH] [testsuite] [arm] test board cflags in multilib.exp Alexandre Oliva
2024-06-11 14:43 ` Richard Earnshaw (lists)

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