[PATCH v8 01/10] Make mcheck tests conditional on GLIBC_2.24 or earlier
Carlos O'Donell
carlos@redhat.com
Sat Jul 17 22:03:38 GMT 2021
On 7/13/21 3:38 AM, Siddhesh Poyarekar wrote:
> Targets with base versions later than 2.24 won't have
> __malloc_initialize_hook because of which the tests will essentially
> be the same as the regular malloc tests. Avoid running them instead
> and save time.
Use have-GLIBC_2.23 for the release before the deprecation of a symbol.
Post v9 please and I'll ACK it quickly.
Tested-by: Carlos O'Donell <carlos@redhat.com>
> ---
> malloc/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/malloc/Makefile b/malloc/Makefile
> index 47369b6084..d15729569b 100644
> --- a/malloc/Makefile
> +++ b/malloc/Makefile
> @@ -78,6 +78,8 @@ tests-exclude-malloc-check = tst-malloc-check tst-malloc-usable \
> # Run all tests with MALLOC_CHECK_=3
> tests-malloc-check = $(filter-out $(tests-exclude-malloc-check),$(tests))
>
> +# -lmcheck needs __malloc_initialize_hook, which was deprecated in 2.24.
OK. Wow, 5 years ago.
> +ifeq ($(have-GLIBC_2.24)$(build-shared),yesyes)
Should be have-GLIBC_2.23, since if it was deprecated in 2.24, a new arch in 2.24
would not have it and it should be tested. You always want the conditional to
trigger on the last release to have the symbol.
> # Tests that don't play well with mcheck. They are either bugs in mcheck or
> # the tests expect specific internal behavior that is changed due to linking to
> # libmcheck.a.
> @@ -100,6 +102,7 @@ tests-exclude-mcheck = tst-mallocstate \
> tst-reallocarray
>
> tests-mcheck = $(filter-out $(tests-exclude-mcheck), $(tests))
> +endif
OK.
>
> routines = malloc morecore mcheck mtrace obstack reallocarray \
> scratch_buffer_dupfree \
>
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list