public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH] math: test-matherr and test-matherr-2 can be regular tests
Date: Mon, 8 Mar 2021 11:05:03 -0300	[thread overview]
Message-ID: <f327d979-768a-1919-e69d-faa740153def@linaro.org> (raw)
In-Reply-To: <87czwekir3.fsf@oldenburg.str.redhat.com>



On 04/03/2021 13:04, Florian Weimer via Libc-alpha wrote:
> compat_symbol_reference is now available without tests-internal.
> Do not build the test at all on glibc versions that lack the symbols,
> to avoid spurious UNSUPPORTED results.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> 
> ---
>  math/Makefile       |  6 +++++-
>  math/test-matherr.c | 13 ++-----------
>  2 files changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/math/Makefile b/math/Makefile
> index 2978abf526..98b26e4f71 100644
> --- a/math/Makefile
> +++ b/math/Makefile
> @@ -249,7 +249,11 @@ tests-static = test-fpucw-static test-fpucw-ieee-static \
>  	       test-signgam-uchar-static test-signgam-uchar-init-static \
>  	       test-signgam-uint-static test-signgam-uint-init-static \
>  	       test-signgam-ullong-static test-signgam-ullong-init-static
> -tests-internal = test-matherr test-matherr-2
> +
> +# The tested symbols matherr, _LIB_VERSION have been removed in glibc 2.27.
> +ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes)
> +tests += test-matherr test-matherr-2
> +endif
>  
>  # These tests use internal (unexported) GMP functions and are linked
>  # statically to obtain access to these functions.

Ok.

> diff --git a/math/test-matherr.c b/math/test-matherr.c
> index e68a4a3af1..aed396e420 100644
> --- a/math/test-matherr.c
> +++ b/math/test-matherr.c
> @@ -23,10 +23,8 @@
>  #include <math-svid-compat.h>
>  #include <shlib-compat.h>
>  
> -#if TEST_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
> -
> -# undef matherr
> -# undef _LIB_VERSION
> +#undef matherr
> +#undef _LIB_VERSION
>  compat_symbol_reference (libm, matherr, matherr, GLIBC_2_0);
>  compat_symbol_reference (libm, _LIB_VERSION, _LIB_VERSION, GLIBC_2_0);
>  
> @@ -47,12 +45,5 @@ do_test (void)
>    acos (2.0);
>    return fail;
>  }
> -#else
> -static int
> -do_test (void)
> -{
> -  return 77;
> -}
> -#endif
>  
>  #include <support/test-driver.c>
> 

Ok.

      reply	other threads:[~2021-03-08 14:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 16:04 Florian Weimer
2021-03-08 14:05 ` Adhemerval Zanella [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f327d979-768a-1919-e69d-faa740153def@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).