From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTPS id F1F4D385828B; Thu, 23 Jun 2022 11:26:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F1F4D385828B Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B30761161BE; Thu, 23 Jun 2022 07:26:30 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SqnCClBd6ml8; Thu, 23 Jun 2022 07:26:30 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 774581161A1; Thu, 23 Jun 2022 07:26:28 -0400 (EDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 25NBQBp5763011 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Jun 2022 08:26:11 -0300 From: Alexandre Oliva To: Jonathan Wakely Cc: Sebastian Huber , gcc-patches , "libstdc++" Subject: Re: [PATCH] libstdc++: testsuite: use -lbsd for net_ts on RTEMS Organization: Free thinker, does not speak for AdaCore References: <5e77936e-a80b-9df4-cc29-aa36cb301df6@embedded-brains.de> Errors-To: aoliva@lxoliva.fsfla.org Date: Thu, 23 Jun 2022 08:26:11 -0300 In-Reply-To: (Jonathan Wakely's message of "Thu, 23 Jun 2022 10:06:48 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2022 11:26:32 -0000 On Jun 23, 2022, Jonathan Wakely wrote: > On Thu, 23 Jun 2022, 10:02 Sebastian Huber, < > sebastian.huber@embedded-brains.de> wrote: >> On 22/06/2022 07:24, Alexandre Oliva via Gcc-patches wrote: >> > + } elseif { [istarget *-*-rtems*] } { >> > + # Adding -Wl,--gc-sections would enable a few more tests to >> > + # link, but all of them fail at runtime anyway, because the >> > + # io_context ctor calls pipe(), which always fails, and thus >> > + # the ctor throws a system error. >> > + return "$flags -lbsd" >> >> Using -Wl,--gc-sections is mandatory if you want to link against >> libbsd.a. Weirdly, it worked for all other testcases. >> For pipe() support in RTEMS, you currently need the >> #define CONFIGURE_IMFS_ENABLE_MKFIFO Thanks, I'll reach out to the person in charge of our rtems configuration for this project, and suggest enabling it on our end. > It would also be fine to just xfail the networking tests for rtems. I was using something like this internally. Regstrapped on x86_64-linux-gnu, also tested with a cross to aarch64-rtems6. Ok to install? libstdc++: xfail io_context/pipe users on rtems From: Alexandre Oliva A handful of tests fail on rtems because pipe() always returns -1, and the io_context ctor throws a system error when pipe() fails. for libstdc++-v3/ChangeLog * testsuite/experimental/net/timer/waitable/cons.cc: xfail on RTEMS. * testsuite/experimental/net/timer/waitable/dest.cc: Likewise. * testsuite/experimental/net/timer/waitable/ops.cc: Likewise. * testsuite/experimental/net/internet/resolver/ops/lookup.cc: Likewise. * testsuite/experimental/net/internet/resolver/ops/reverse.cc: Likewise. TN: V617-003 --- .../net/internet/resolver/ops/lookup.cc | 1 + .../net/internet/resolver/ops/reverse.cc | 1 + .../experimental/net/timer/waitable/cons.cc | 1 + .../experimental/net/timer/waitable/dest.cc | 1 + .../experimental/net/timer/waitable/ops.cc | 1 + 5 files changed, 5 insertions(+) diff --git a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc index eb411dea8369c..7684c21012dfb 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc @@ -18,6 +18,7 @@ // { dg-do run { target c++14 } } // { dg-require-effective-target net_ts_ip } // { dg-add-options net_ts } +// { dg-xfail-if "io_context requires a working pipe" { *-*-rtems* } } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc index 361df2676efc8..3ef51f9ebe848 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc @@ -18,6 +18,7 @@ // { dg-do run { target c++14 } } // { dg-require-effective-target net_ts_ip } // { dg-add-options net_ts } +// { dg-xfail-if "io_context requires a working pipe" { *-*-rtems* } } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc index 40ae5b965a2b0..4e055eadb20a0 100644 --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc @@ -17,6 +17,7 @@ // { dg-do run { target c++14 } } // { dg-add-options libatomic } +// { dg-xfail-if "io_context requires a working pipe" { *-*-rtems* } } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc index f571f4a8d861a..2f2e425fa0b33 100644 --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc @@ -17,6 +17,7 @@ // { dg-do run { target c++14 } } // { dg-add-options libatomic } +// { dg-xfail-if "io_context requires a working pipe" { *-*-rtems* } } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc index 97ab629b893a9..a52f3259193c4 100644 --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc @@ -17,6 +17,7 @@ // { dg-do run { target c++14 } } // { dg-add-options libatomic } +// { dg-xfail-if "io_context requires a working pipe" { *-*-rtems* } } #include #include -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about