malloc: Various cleanups for malloc/tst-mxfast

(cherry picked from commit f9769a2397)
This commit is contained in:
Florian Weimer 2019-08-15 11:37:18 +02:00 committed by Arjun Shankar
parent 09b81b2bab
commit 09abef31a5
3 changed files with 16 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2019-08-15 Florian Weimer <fweimer@redhat.com>
* malloc/Makefile (tests): Only add tst-mxfast for
$(have-tunables).
* malloc/tst-mxfast.c: Fix copyright year.
(do_test): Fix GNU style issues. Use TEST_COMPARE instead of
assert for checks.
2019-08-09 DJ Delorie <dj@redhat.com>
* elf/dl-tunables.list: Add glibc.malloc.mxfast.

View File

@ -39,7 +39,6 @@ tests := mallocbug tst-malloc tst-valloc tst-calloc tst-obstack \
tst-malloc-too-large \
tst-malloc-stats-cancellation \
tst-tcfree1 tst-tcfree2 tst-tcfree3 \
tst-mxfast \
tests-static := \
tst-interpose-static-nothread \
@ -55,7 +54,7 @@ tests-internal += \
tst-dynarray-at-fail \
ifneq (no,$(have-tunables))
tests += tst-malloc-usable-tunables
tests += tst-malloc-usable-tunables tst-mxfast
tests-static += tst-malloc-usable-static-tunables
endif

View File

@ -1,5 +1,5 @@
/* Test that glibc.malloc.mxfast tunable works.
Copyright (C) 2018, 2019 Free Software Foundation, Inc.
Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -21,7 +21,7 @@
the fast bins. */
#include <malloc.h>
#include <assert.h>
#include <support/check.h>
int
do_test (void)
@ -39,7 +39,7 @@ do_test(void)
m = mallinfo ();
/* This will fail if there are any blocks in the fastbins. */
assert (m.smblks == 0);
TEST_COMPARE (m.smblks, 0);
/* To keep gcc happy. */
free (p2);