Message ID | 87lehxswug.fsf@euler.schwinge.homeip.net |
---|---|
State | New |
Headers | show |
Series | Testsuite: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage (was: Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS') | expand |
Hi! On Tue, 9 May 2023 at 11:00, Thomas Schwinge <thomas@codesourcery.com> wrote: > Hi Christophe! > > On 2023-05-09T09:32:55+0200, Christophe Lyon <christophe.lyon@linaro.org> > wrote: > > On Wed, 3 May 2023 at 13:47, Richard Biener via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > >> On Wed, 3 May 2023, Thomas Schwinge wrote: > >> > "Let each 'lto_init' determine the default 'LTO_OPTIONS', and > 'torture-init' the 'LTO_TORTURE_OPTIONS'"? > > > > This is causing issues on arm/aarch64, including: > > > > ERROR: can't read "LTO_TORTURE_OPTIONS": no such variable > > in gcc.target/arm/acle/acle.exp: > > > > ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected > > in gcc.target/aarch64/sls-mitigation/sls-mitigation.exp, > > gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp, > > gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp, > > gcc.target/aarch64/torture/aarch64-torture.exp > > > > and maybe others > > > > Are other targets affected too? > > Sorry for that -- it means, the safe-guards I added are working as > expected. > > Please test whether all these issues are gone with the attached > "Testsuite: Add missing 'torture-init'/'torture-finish' around > 'LTO_TORTURE_OPTIONS' usage"? > > Your patch seemed reasonable, but it doesn't work :-( Well now I get: ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected because gcc-dg-runtest itself calls torture-init but I'm not sure where LTO_TORTURE_OPTIONS is set Christophe > Grüße > Thomas > > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, > 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: > Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; > Registergericht München, HRB 106955 >
Hi Thomas, On Tue, 9 May 2023 at 17:17, Christophe Lyon <christophe.lyon@linaro.org> wrote: > Hi! > > On Tue, 9 May 2023 at 11:00, Thomas Schwinge <thomas@codesourcery.com> > wrote: > >> Hi Christophe! >> >> On 2023-05-09T09:32:55+0200, Christophe Lyon <christophe.lyon@linaro.org> >> wrote: >> > On Wed, 3 May 2023 at 13:47, Richard Biener via Gcc-patches < >> gcc-patches@gcc.gnu.org> wrote: >> >> On Wed, 3 May 2023, Thomas Schwinge wrote: >> >> > "Let each 'lto_init' determine the default 'LTO_OPTIONS', and >> 'torture-init' the 'LTO_TORTURE_OPTIONS'"? >> > >> > This is causing issues on arm/aarch64, including: >> > >> > ERROR: can't read "LTO_TORTURE_OPTIONS": no such variable >> > in gcc.target/arm/acle/acle.exp: >> > >> > ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected >> > in gcc.target/aarch64/sls-mitigation/sls-mitigation.exp, >> > gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp, >> > gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp, >> > gcc.target/aarch64/torture/aarch64-torture.exp >> > >> > and maybe others >> > >> > Are other targets affected too? >> >> Sorry for that -- it means, the safe-guards I added are working as >> expected. >> >> Please test whether all these issues are gone with the attached >> "Testsuite: Add missing 'torture-init'/'torture-finish' around >> 'LTO_TORTURE_OPTIONS' usage"? >> >> > Your patch seemed reasonable, but it doesn't work :-( > > Well now I get: > ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected > because gcc-dg-runtest itself calls torture-init > > but I'm not sure where LTO_TORTURE_OPTIONS is set > > Just checking, are you able to test your changes on arm (a cross toolchain is OK) ? The problem shows up even if running only acle.exp, so it's quick once you have built the toolchain once. I spent some time looking at it, and the conflict is that the .exp file calls torture-init and gcc-dg-runtest, which in turn calls torture-init again, leading to the error. I haven't checked the details of why there are similar failures on aarch64. Thanks, Christophe > Christophe > > >> Grüße >> Thomas >> >> >> ----------------- >> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, >> 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: >> Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; >> Registergericht München, HRB 106955 >> >
From 5f158fb7a5167e943e1410c7faa30e682ae85c4d Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Tue, 9 May 2023 10:35:27 +0200 Subject: [PATCH] Testsuite: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage Recent commit d6654a4be3ba44c0d57be7c8a51d76d9721345e1 "Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS'" made it a requirement that 'LTO_TORTURE_OPTIONS' usage be within 'torture-init'/'torture-finish', and missed a few cases that didn't have that. gcc/testsuite/ * gcc.target/arm/acle/acle.exp: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage. * gcc.target/arm/cmse/cmse.exp: Likewise. * gcc.target/arm/pure-code/pure-code.exp: Likewise. --- gcc/testsuite/gcc.target/arm/acle/acle.exp | 3 +++ gcc/testsuite/gcc.target/arm/cmse/cmse.exp | 2 ++ gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp | 2 ++ 3 files changed, 7 insertions(+) diff --git a/gcc/testsuite/gcc.target/arm/acle/acle.exp b/gcc/testsuite/gcc.target/arm/acle/acle.exp index 7b99dd72987..4d63ccc9554 100644 --- a/gcc/testsuite/gcc.target/arm/acle/acle.exp +++ b/gcc/testsuite/gcc.target/arm/acle/acle.exp @@ -26,6 +26,7 @@ load_lib gcc-dg.exp # Initialize `dg'. dg-init +torture-init set saved-dg-do-what-default ${dg-do-what-default} set dg-do-what-default "assemble" @@ -48,5 +49,7 @@ gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \ # Restore globals set dg-do-what-default ${saved-dg-do-what-default} set LTO_TORTURE_OPTIONS ${saved-lto_torture_options} + # All done. +torture-finish dg-finish diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse.exp b/gcc/testsuite/gcc.target/arm/cmse/cmse.exp index 1d251a4fa1f..0baf8c5a504 100644 --- a/gcc/testsuite/gcc.target/arm/cmse/cmse.exp +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse.exp @@ -32,6 +32,7 @@ if ![info exists DEFAULT_CFLAGS] then { # Initialize `dg'. dg-init +torture-init set saved-dg-do-what-default ${dg-do-what-default} @@ -104,4 +105,5 @@ set LTO_TORTURE_OPTIONS ${saved-lto_torture_options} set dg-do-what-default ${saved-dg-do-what-default} # All done. +torture-finish dg-finish diff --git a/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp b/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp index c23392dcdfd..6d32e4a7f8d 100644 --- a/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp +++ b/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp @@ -35,6 +35,7 @@ if ![info exists DEFAULT_CFLAGS] then { if {[check_effective_target_arm_cortex_m]} then { # Initialize `dg'. dg-init +torture-init set saved-dg-do-what-default ${dg-do-what-default} set dg-do-what-default "assemble" @@ -58,5 +59,6 @@ set dg-do-what-default ${saved-dg-do-what-default} set LTO_TORTURE_OPTIONS ${saved-lto_torture_options} # All done. +torture-finish dg-finish } -- 2.34.1