From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 82A67385087F for ; Thu, 23 Jun 2022 11:40:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82A67385087F Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-639-K1RZtjmEMUKSPwwqubSVKg-1; Thu, 23 Jun 2022 07:40:43 -0400 X-MC-Unique: K1RZtjmEMUKSPwwqubSVKg-1 Received: by mail-ed1-f69.google.com with SMTP id y15-20020a056402270f00b004356adb2ab3so11988042edd.16 for ; Thu, 23 Jun 2022 04:40:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lZQpf1yhcYVbby0HmCu7iGTpq/x1g4dj68nhCah3JKg=; b=sqIR2mwlIXwqb5MthQfpwwM3MdEq2cbqK/mmNs7+uqfXdn+TMbHYHSUBGkE7OCYcUu x/ULK+p1RHpsHH+PbomzzHx+yMMaY/hcDEqyXp1xfPYdMy9own37c04T7+J5Srj+RBxJ U//QGQRmvX9ONQV4XnyGOBop4+lay3yUCd+epwuu2iC4kKfGB1prQRsG3uKk4+tWwr1k OjvUnr9OX/f4HBLIdRysGRF+ZM02YpYybfuVnxyrpGf+/6x/b8fDfW0Q2Hy0SANVZ9nT FkXCbYAVGa12iAjSKip3/7bH5Pj+lOkU5EiD85bMLZZo5OOP1ZmJUcVqsAam6ZQrLFOM s/8g== X-Gm-Message-State: AJIora8Z2pbuKVrhr/ep/NX6bD1zNcnU+g6h1wQHdNXJW+jH0gHfL4fH /PJW4fURL6b6XaxnGkZ2mqtGe4+RqYiVWlCWsgVnMnJIiRsIqoiipBhfYlcN8NgTl1yH3MrAJFR HxD5oexwYDc/nf7F3JPlCJhvfiHpj45M= X-Received: by 2002:a05:6402:354c:b0:431:51e2:eef9 with SMTP id f12-20020a056402354c00b0043151e2eef9mr10377374edd.344.1655984441280; Thu, 23 Jun 2022 04:40:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sdFR0mDWVJTpjpg+sOn5SJH+dmMddnkBkGttz1YFoJX69MfGcho3HTO9hgGpdnqBBEnfTExHncRTS/6hh9Uns= X-Received: by 2002:a05:6402:354c:b0:431:51e2:eef9 with SMTP id f12-20020a056402354c00b0043151e2eef9mr10377345edd.344.1655984441021; Thu, 23 Jun 2022 04:40:41 -0700 (PDT) MIME-Version: 1.0 References: <5e77936e-a80b-9df4-cc29-aa36cb301df6@embedded-brains.de> In-Reply-To: From: Jonathan Wakely Date: Thu, 23 Jun 2022 12:40:30 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: testsuite: use -lbsd for net_ts on RTEMS To: Alexandre Oliva Cc: Jonathan Wakely , "libstdc++" , gcc-patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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:40:51 -0000 On Thu, 23 Jun 2022 at 12:26, Alexandre Oliva via Libstdc++ wrote: > > 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? OK, thanks. > > > 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 >