public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH]libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal
@ 2020-04-01 15:28 Andrea Corallo
  2020-04-01 15:56 ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Corallo @ 2020-04-01 15:28 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++, nd

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

Hi all,

"use_service.cc" libstdc++ test does not compile for baremetal,
unfortunately AFAIK we don't have an appropriate selector to skip
these.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89760

https://gcc.gnu.org/legacy-ml/gcc-patches/2018-10/msg01089.html

While the full issue is tackled would be possible to install this
patch to have it disabled on aarch64 baremetal where it is known to
be failing?

Thanks

  Andrea

libstdc++-v3/ChangeLog
2020-??-??  Andrea Corallo  <andrea.corallo@arm.com>

	* testsuite/experimental/net/execution_context/use_service.cc:
	Skip on aarch64-none-elf.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-testsuite-disabled-use_service-on-aarch64-bare-metal.patch --]
[-- Type: text/x-diff, Size: 933 bytes --]

From 23a0b92477b976a5f9e9df20fdaac90c943ba840 Mon Sep 17 00:00:00 2001
From: Andrea Corallo <andrea.corallo@arm.com>
Date: Wed, 1 Apr 2020 10:19:04 +0100
Subject: [PATCH] testsuite: disabled use_service on aarch64 bare metal

---
 .../testsuite/experimental/net/execution_context/use_service.cc  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc b/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
index 8a2d03fb1bb8..9cf97618e64b 100644
--- a/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
+++ b/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do run { target c++14 } }
+// { dg-skip-if "Disable on aarch64 bare metal" { aarch64*-*-elf } }
 
 #include <experimental/executor>
 #include <testsuite_hooks.h>
-- 
2.17.1


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

* Re: [PATCH]libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal
  2020-04-01 15:28 [PATCH]libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal Andrea Corallo
@ 2020-04-01 15:56 ` Jonathan Wakely
  2020-04-01 15:59   ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2020-04-01 15:56 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: gcc-patches, nd, libstdc++

On 01/04/20 17:28 +0200, Andrea Corallo wrote:
>Hi all,
>
>"use_service.cc" libstdc++ test does not compile for baremetal,
>unfortunately AFAIK we don't have an appropriate selector to skip
>these.
>
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89760
>
>https://gcc.gnu.org/legacy-ml/gcc-patches/2018-10/msg01089.html
>
>While the full issue is tackled would be possible to install this
>patch to have it disabled on aarch64 baremetal where it is known to
>be failing?

No, I don't want to paper over the problem on every individual target
where they fail.

The correct fix is either to mark the tests as requiring gthreads (as
most tests under libstdc++-v3/testsuite/30_threads/ do) or to modify
the library code to work without mutexes for targets without thread
support.


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

* Re: [PATCH]libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal
  2020-04-01 15:56 ` Jonathan Wakely
@ 2020-04-01 15:59   ` Jonathan Wakely
  2020-04-02  8:44     ` Andrea Corallo
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2020-04-01 15:59 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: gcc-patches, nd, libstdc++

On 01/04/20 16:56 +0100, Jonathan Wakely wrote:
>On 01/04/20 17:28 +0200, Andrea Corallo wrote:
>>Hi all,
>>
>>"use_service.cc" libstdc++ test does not compile for baremetal,
>>unfortunately AFAIK we don't have an appropriate selector to skip
>>these.
>>
>>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89760
>>
>>https://gcc.gnu.org/legacy-ml/gcc-patches/2018-10/msg01089.html
>>
>>While the full issue is tackled would be possible to install this
>>patch to have it disabled on aarch64 baremetal where it is known to
>>be failing?
>
>No, I don't want to paper over the problem on every individual target
>where they fail.
>
>The correct fix is either to mark the tests as requiring gthreads (as
>most tests under libstdc++-v3/testsuite/30_threads/ do) or to modify

e.g. something like:

// { dg-do run }
// { dg-options "-pthread"  }
// { dg-require-effective-target c++14 }
// { dg-require-effective-target pthread }
// { dg-require-gthreads "" }

Does that help, or does it still fail for other reasons?


>the library code to work without mutexes for targets without thread
>support.
>


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

* Re: [PATCH]libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal
  2020-04-01 15:59   ` Jonathan Wakely
@ 2020-04-02  8:44     ` Andrea Corallo
  2020-04-02  9:14       ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Corallo @ 2020-04-02  8:44 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-patches, nd, libstdc++

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

Jonathan Wakely <jwakely@redhat.com> writes:

> On 01/04/20 16:56 +0100, Jonathan Wakely wrote:

> Does that help, or does it still fail for other reasons?

Yes it does thanks!  Updated patch follows.

Okay for trunk?

Thanks

  Andrea

libstdc++-v3/ChangeLog
2020-??-??  Andrea Corallo  <andrea.corallo@arm.com>

	* testsuite/experimental/net/execution_context/use_service.cc:
	Require pthread and gthreads.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-89760.patch --]
[-- Type: text/x-diff, Size: 1056 bytes --]

From 5aa45ce35b947b88d18ccb9026d10e2c0e2fc22c Mon Sep 17 00:00:00 2001
From: Andrea Corallo <andrea.corallo@arm.com>
Date: Wed, 1 Apr 2020 10:19:04 +0100
Subject: [PATCH] 89760

---
 .../experimental/net/execution_context/use_service.cc       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc b/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
index 8a2d03fb1bb8..d242d63cb94e 100644
--- a/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
+++ b/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
@@ -15,7 +15,11 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run { target c++14 } }
+// { dg-do run }
+// { dg-options "-pthread"  }
+// { dg-require-effective-target c++14 }
+// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 #include <experimental/executor>
 #include <testsuite_hooks.h>
-- 
2.17.1


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

* Re: [PATCH]libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal
  2020-04-02  8:44     ` Andrea Corallo
@ 2020-04-02  9:14       ` Jonathan Wakely
  2020-04-02  9:55         ` Andrea Corallo
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2020-04-02  9:14 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: gcc-patches, nd, libstdc++

On 02/04/20 10:44 +0200, Andrea Corallo wrote:
>Jonathan Wakely <jwakely@redhat.com> writes:
>
>> On 01/04/20 16:56 +0100, Jonathan Wakely wrote:
>
>> Does that help, or does it still fail for other reasons?
>
>Yes it does thanks!  Updated patch follows.
>
>Okay for trunk?

OK, thanks.


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

* Re: [PATCH]libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal
  2020-04-02  9:14       ` Jonathan Wakely
@ 2020-04-02  9:55         ` Andrea Corallo
  0 siblings, 0 replies; 6+ messages in thread
From: Andrea Corallo @ 2020-04-02  9:55 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-patches, nd, libstdc++

Jonathan Wakely <jwakely@redhat.com> writes:

> On 02/04/20 10:44 +0200, Andrea Corallo wrote:
>>Jonathan Wakely <jwakely@redhat.com> writes:
>>
>>> On 01/04/20 16:56 +0100, Jonathan Wakely wrote:
>>
>>> Does that help, or does it still fail for other reasons?
>>
>>Yes it does thanks!  Updated patch follows.
>>
>>Okay for trunk?
>
> OK, thanks.

Committed as c1effaa209f9.

Thanks

  Andrea

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

end of thread, other threads:[~2020-04-02  9:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 15:28 [PATCH]libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal Andrea Corallo
2020-04-01 15:56 ` Jonathan Wakely
2020-04-01 15:59   ` Jonathan Wakely
2020-04-02  8:44     ` Andrea Corallo
2020-04-02  9:14       ` Jonathan Wakely
2020-04-02  9:55         ` Andrea Corallo

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