libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal

Message ID gkrftdnxm1i.fsf@arm.com
State New
Headers show
Series
  • libstdc++-v3/test: Skip "use_service.cc" for aarch64 baremetal
Related show

Commit Message

Andrea Corallo April 1, 2020, 3:28 p.m.
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.

Comments

Iain Buclaw via Gcc-patches April 1, 2020, 3:56 p.m. | #1
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.
Iain Buclaw via Gcc-patches April 1, 2020, 3:59 p.m. | #2
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.

>
Andrea Corallo April 2, 2020, 8:44 a.m. | #3
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.
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
Iain Buclaw via Gcc-patches April 2, 2020, 9:14 a.m. | #4
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.
Andrea Corallo April 2, 2020, 9:55 a.m. | #5
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

Patch

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