* [PATCH, GCC/testsuite/ARM] XFAIL optional_thumb-1 and optional_thumb-2 testcases
@ 2016-12-02 16:35 Thomas Preudhomme
2016-12-05 9:01 ` Christophe Lyon
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Preudhomme @ 2016-12-02 16:35 UTC (permalink / raw)
To: Kyrill Tkachov, Ramana Radhakrishnan, Richard Earnshaw, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]
Hi,
The logic to make -mthumb optional for Thumb-only targets was designed to only
apply when no mode is specified either at compile time or when the toolchain was
configured (using --with-mode). The dg-skip-if in the testcases optional_thumb-1
and optional_thumb-2 catch the former case but not the latter. Unfortunately
there is no dejagnu procedure to check the presence of an option in the
configure line used for the compiler. This patch marks the two tests as XFAIL
since that will at least allow to catch a change from PASS to XFAIL, thus making
the test still useful. It also fixes a codestyle issue in the target triplet of
the dg-skip-if directives of all the optional_thumb-* testcases.
ChangeLog entry is as follows:
*** gcc/testsuite/ChangeLog ***
2016-12-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
* gcc.target/arm/optional_thumb-3.c: Fix codestyle issue in target
triplet of dg-skip-if.
* gcc.target/arm/optional_thumb-1.c: Likewise and add xfail.
* gcc.target/arm/optional_thumb-2.c: Likewise.
Is this ok for stage3?
Best regards,
Thomas
[-- Attachment #2: xfail_optional_thumb_testcases.patch --]
[-- Type: text/x-patch, Size: 2248 bytes --]
diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-1.c b/gcc/testsuite/gcc.target/arm/optional_thumb-1.c
index 23df62887ba4aaa1d8717a34ecda9a40246f0552..27787bb8a403534abf708be02a80bdcf42638958 100644
--- a/gcc/testsuite/gcc.target/arm/optional_thumb-1.c
+++ b/gcc/testsuite/gcc.target/arm/optional_thumb-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
-/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-*} { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
+/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-* } { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
/* { dg-options "-march=armv6-m" } */
+/* { dg-xfail-if "fails if GCC configured with --with-mode=arm" { *-*-* } } */
/* Check that -mthumb is not needed when compiling for a Thumb-only target. */
diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-2.c b/gcc/testsuite/gcc.target/arm/optional_thumb-2.c
index 4bd53a45eca97e62dd3b86d5a1a66c5ca21e7aad..5a8e5e8cfccf8d9175432ef6b5c07cb0b5f7b0bf 100644
--- a/gcc/testsuite/gcc.target/arm/optional_thumb-2.c
+++ b/gcc/testsuite/gcc.target/arm/optional_thumb-2.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
-/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-*} { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
+/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-* } { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
/* { dg-options "-mcpu=cortex-m4" } */
+/* { dg-xfail-if "fails if GCC configured with --with-mode=arm" { *-*-* } } */
/* Check that -mthumb is not needed when compiling for a Thumb-only target. */
diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-3.c b/gcc/testsuite/gcc.target/arm/optional_thumb-3.c
index f1fd5c8840b191e600c20a7817c611bb9bb645df..735c2774738c8d84deb14a9f082c34bf622b2d5d 100644
--- a/gcc/testsuite/gcc.target/arm/optional_thumb-3.c
+++ b/gcc/testsuite/gcc.target/arm/optional_thumb-3.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_cortex_m } */
-/* { dg-skip-if "-mthumb given" { *-*-*} { "-mthumb" } } */
+/* { dg-skip-if "-mthumb given" { *-*-* } { "-mthumb" } } */
/* { dg-options "-marm" } */
/* { dg-error "target CPU does not support ARM mode" "missing error with -marm on Thumb-only targets" { target *-*-*} 0 } */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, GCC/testsuite/ARM] XFAIL optional_thumb-1 and optional_thumb-2 testcases
2016-12-02 16:35 [PATCH, GCC/testsuite/ARM] XFAIL optional_thumb-1 and optional_thumb-2 testcases Thomas Preudhomme
@ 2016-12-05 9:01 ` Christophe Lyon
2016-12-05 9:11 ` Thomas Preudhomme
0 siblings, 1 reply; 3+ messages in thread
From: Christophe Lyon @ 2016-12-05 9:01 UTC (permalink / raw)
To: Thomas Preudhomme
Cc: Kyrill Tkachov, Ramana Radhakrishnan, Richard Earnshaw, gcc-patches
On 2 December 2016 at 17:35, Thomas Preudhomme
<thomas.preudhomme@foss.arm.com> wrote:
> Hi,
>
> The logic to make -mthumb optional for Thumb-only targets was designed to
> only apply when no mode is specified either at compile time or when the
> toolchain was configured (using --with-mode). The dg-skip-if in the
> testcases optional_thumb-1 and optional_thumb-2 catch the former case but
> not the latter. Unfortunately there is no dejagnu procedure to check the
> presence of an option in the configure line used for the compiler. This
> patch marks the two tests as XFAIL since that will at least allow to catch a
> change from PASS to XFAIL, thus making the test still useful. It also fixes
> a codestyle issue in the target triplet of the dg-skip-if directives of all
> the optional_thumb-* testcases.
>
So, this makes the test XPASS when no --with-mode or --with-mode=thumb
is used.
Isn't it possible to add an dejagnu effective target to detect this
configure option? I guess you looked at that but the effort is not worth it?
Christophe
> ChangeLog entry is as follows:
>
> *** gcc/testsuite/ChangeLog ***
>
> 2016-12-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
>
> * gcc.target/arm/optional_thumb-3.c: Fix codestyle issue in target
> triplet of dg-skip-if.
> * gcc.target/arm/optional_thumb-1.c: Likewise and add xfail.
> * gcc.target/arm/optional_thumb-2.c: Likewise.
>
> Is this ok for stage3?
>
> Best regards,
>
> Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, GCC/testsuite/ARM] XFAIL optional_thumb-1 and optional_thumb-2 testcases
2016-12-05 9:01 ` Christophe Lyon
@ 2016-12-05 9:11 ` Thomas Preudhomme
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Preudhomme @ 2016-12-05 9:11 UTC (permalink / raw)
To: Christophe Lyon
Cc: Kyrill Tkachov, Ramana Radhakrishnan, Richard Earnshaw, gcc-patches
On 05/12/16 09:01, Christophe Lyon wrote:
> On 2 December 2016 at 17:35, Thomas Preudhomme
> <thomas.preudhomme@foss.arm.com> wrote:
>> Hi,
>>
>> The logic to make -mthumb optional for Thumb-only targets was designed to
>> only apply when no mode is specified either at compile time or when the
>> toolchain was configured (using --with-mode). The dg-skip-if in the
>> testcases optional_thumb-1 and optional_thumb-2 catch the former case but
>> not the latter. Unfortunately there is no dejagnu procedure to check the
>> presence of an option in the configure line used for the compiler. This
>> patch marks the two tests as XFAIL since that will at least allow to catch a
>> change from PASS to XFAIL, thus making the test still useful. It also fixes
>> a codestyle issue in the target triplet of the dg-skip-if directives of all
>> the optional_thumb-* testcases.
>>
>
> So, this makes the test XPASS when no --with-mode or --with-mode=thumb
> is used.
Yes. At least we can still see change from XPASS to XFAIL and not let people
worry if they build GCC with --with-mode=* and the test fails.
>
> Isn't it possible to add an dejagnu effective target to detect this
> configure option? I guess you looked at that but the effort is not worth it?
Since we can run the compiler to compile testcases it should be possible to run
it with -v and then check the output for something. However that would involve
more code so would take me more time to come up with a solution and I want to
have a solution for the short term.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-05 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 16:35 [PATCH, GCC/testsuite/ARM] XFAIL optional_thumb-1 and optional_thumb-2 testcases Thomas Preudhomme
2016-12-05 9:01 ` Christophe Lyon
2016-12-05 9:11 ` Thomas Preudhomme
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).