Message ID | 20180903145430.GA11187@redhat.com |
---|---|
State | New |
Headers | show |
Series | PR libstdc++/78179 run long double tests separately | expand |
On Mon, 3 Sep 2018 at 16:54, Jonathan Wakely <jwakely@redhat.com> wrote: > > Split the long double testing into a separate file, so that we can XFAIL > targets where the long double precision doesn't meet the expected > tolerances. The float and double tests are still expefted to PASS for > all targets. > > PR libstdc++/78179 > * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test > that runs the long double part of hypot.cc. > * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double > tests unless TEST_HYPOT_LONG_DOUBLE is defined. > > Tested x86_64-linux, committed to trunk. > Hi, I have noticed failures on hypot-long-double.cc on arm, so I suggest we add: diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc index 8a05473..4c2e33b 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc @@ -17,7 +17,7 @@ // { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* arm*-*-* } } // Run the long double tests from hypot.cc separately, because they fail on a // number of targets. See PR libstdc++/78179 for details. OK? Christophe
Hi Christophe, > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add: > > diff --git > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > index 8a05473..4c2e33b 100644 > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > @@ -17,7 +17,7 @@ > > // { dg-options "-std=gnu++17" } > // { dg-do run { target c++17 } } > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* > nios2-*-* arm*-*-* } } > > // Run the long double tests from hypot.cc separately, because they fail on a > // number of targets. See PR libstdc++/78179 for details. > > OK? just a nit (and not a review): I'd prefer the target list to be sorted alphabetically, not completely random. Thanks. Rainer
On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote: > > Hi Christophe, > > > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add: > > > > diff --git > > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > > index 8a05473..4c2e33b 100644 > > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > > @@ -17,7 +17,7 @@ > > > > // { dg-options "-std=gnu++17" } > > // { dg-do run { target c++17 } } > > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } > > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* > > nios2-*-* arm*-*-* } } > > > > // Run the long double tests from hypot.cc separately, because they fail on a > > // number of targets. See PR libstdc++/78179 for details. > > > > OK? > > just a nit (and not a review): I'd prefer the target list to be sorted > alphabetically, not completely random. > Sure, I can sort the whole list, if OK on principle. Christophe > Thanks. > Rainer > > -- > ----------------------------------------------------------------------------- > Rainer Orth, Center for Biotechnology, Bielefeld University
On 20/09/18 15:36 +0200, Christophe Lyon wrote: >On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote: >> >> Hi Christophe, >> >> > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add: >> > >> > diff --git >> > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc >> > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc >> > index 8a05473..4c2e33b 100644 >> > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc >> > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc >> > @@ -17,7 +17,7 @@ >> > >> > // { dg-options "-std=gnu++17" } >> > // { dg-do run { target c++17 } } >> > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } >> > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* >> > nios2-*-* arm*-*-* } } >> > >> > // Run the long double tests from hypot.cc separately, because they fail on a >> > // number of targets. See PR libstdc++/78179 for details. >> > >> > OK? >> >> just a nit (and not a review): I'd prefer the target list to be sorted >> alphabetically, not completely random. >> > >Sure, I can sort the whole list, if OK on principle. Yes, please go ahead and commit it with the sorted list.
On Thu, 20 Sep 2018 at 16:22, Jonathan Wakely <jwakely@redhat.com> wrote: > > On 20/09/18 15:36 +0200, Christophe Lyon wrote: > >On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote: > >> > >> Hi Christophe, > >> > >> > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add: > >> > > >> > diff --git > >> > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > >> > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > >> > index 8a05473..4c2e33b 100644 > >> > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > >> > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc > >> > @@ -17,7 +17,7 @@ > >> > > >> > // { dg-options "-std=gnu++17" } > >> > // { dg-do run { target c++17 } } > >> > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } > >> > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* > >> > nios2-*-* arm*-*-* } } > >> > > >> > // Run the long double tests from hypot.cc separately, because they fail on a > >> > // number of targets. See PR libstdc++/78179 for details. > >> > > >> > OK? > >> > >> just a nit (and not a review): I'd prefer the target list to be sorted > >> alphabetically, not completely random. > >> > > > >Sure, I can sort the whole list, if OK on principle. > > Yes, please go ahead and commit it with the sorted list. > OK committed as r264443: Index: testsuite/26_numerics/headers/cmath/hypot-long-double.cc =================================================================== --- testsuite/26_numerics/headers/cmath/hypot-long-double.cc (revision 264442) +++ testsuite/26_numerics/headers/cmath/hypot-long-double.cc (revision 264443) @@ -17,7 +17,7 @@ // { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } +// { dg-xfail-run-if "PR 78179" { arm*-*-* hppa-*-linux* nios2-*-* powerpc-ibm-aix* } } // Run the long double tests from hypot.cc separately, because they fail on a // number of targets. See PR libstdc++/78179 for details.
On 21/09/18 02:52 +0200, Hans-Peter Nilsson wrote: >> Date: Thu, 20 Sep 2018 15:22:23 +0100 >> From: Jonathan Wakely <jwakely@redhat.com> > >> On 20/09/18 15:36 +0200, Christophe Lyon wrote: >> >On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote: >> >> >> >> Hi Christophe, >> >> >> >> > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add: >> >> > >> >> > diff --git >> >> > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc >> >> > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc >> >> > index 8a05473..4c2e33b 100644 >> >> > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc >> >> > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc >> >> > @@ -17,7 +17,7 @@ >> >> > >> >> > // { dg-options "-std=gnu++17" } >> >> > // { dg-do run { target c++17 } } >> >> > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } >> >> > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* >> >> > nios2-*-* arm*-*-* } } >> >> > >> >> > // Run the long double tests from hypot.cc separately, because they fail on a >> >> > // number of targets. See PR libstdc++/78179 for details. >> >> > >> >> > OK? >> >> >> >> just a nit (and not a review): I'd prefer the target list to be sorted >> >> alphabetically, not completely random. >> >> >> > >> >Sure, I can sort the whole list, if OK on principle. >> >> Yes, please go ahead and commit it with the sorted list. > >"Me too". Can I please, rather than piling on to a target list, >replace the whole xfail-list with the equivalent of "target { ! >large_long_double }" (an already-existing "effective target")? That looks like exactly what we want here, thanks.
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc new file mode 100644 index 00000000000..8a054735ce9 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc @@ -0,0 +1,25 @@ +// Copyright (C) 2016-2018 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-options "-std=gnu++17" } +// { dg-do run { target c++17 } } +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } + +// Run the long double tests from hypot.cc separately, because they fail on a +// number of targets. See PR libstdc++/78179 for details. +#define TEST_HYPOT_LONG_DOUBLE +#include "hypot.cc" diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc index 69840c8117a..36c7553c5e8 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc @@ -17,7 +17,6 @@ // { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } -// { dg-xfail-run-if "AIX long double" { powerpc-ibm-aix* } } #include <cmath> #include <type_traits> @@ -126,9 +125,13 @@ const long double toler3 = 1e-16l; void test01() { + // See hypot-long-double.cc for this macro +#ifndef TEST_HYPOT_LONG_DOUBLE test(data1, toler1); test(data2, toler2); +#else test(data3, toler3); +#endif } int