d8307d
commit 5dab5eafb3dc2f72aaab911084d127d1af45a08c
d8307d
Author: Florian Weimer <fweimer@redhat.com>
d8307d
Date:   Thu Aug 15 11:37:18 2019 +0200
d8307d
d8307d
    malloc: Various cleanups for malloc/tst-mxfast
d8307d
    
d8307d
    (cherry picked from commit f9769a239784772453d595bc2f4bed8739810e06)
d8307d
d8307d
diff --git a/malloc/Makefile b/malloc/Makefile
d8307d
index bf9a53cb7c5ebacb..19c2a846ed8ce049 100644
d8307d
--- a/malloc/Makefile
d8307d
+++ b/malloc/Makefile
d8307d
@@ -39,7 +39,6 @@ tests := mallocbug tst-malloc tst-valloc tst-calloc tst-obstack \
d8307d
 	 tst-malloc-too-large \
d8307d
 	 tst-malloc-stats-cancellation \
d8307d
 	 tst-tcfree1 tst-tcfree2 tst-tcfree3 \
d8307d
-	 tst-mxfast \
d8307d
 
d8307d
 tests-static := \
d8307d
 	 tst-interpose-static-nothread \
d8307d
@@ -55,7 +54,7 @@ tests-internal += \
d8307d
 	 tst-dynarray-at-fail \
d8307d
 
d8307d
 ifneq (no,$(have-tunables))
d8307d
-tests += tst-malloc-usable-tunables
d8307d
+tests += tst-malloc-usable-tunables tst-mxfast
d8307d
 tests-static += tst-malloc-usable-static-tunables
d8307d
 endif
d8307d
 
d8307d
diff --git a/malloc/tst-mxfast.c b/malloc/tst-mxfast.c
d8307d
index 7a371d2f9d2f0005..7a7750bc71024bfb 100644
d8307d
--- a/malloc/tst-mxfast.c
d8307d
+++ b/malloc/tst-mxfast.c
d8307d
@@ -1,5 +1,5 @@
d8307d
 /* Test that glibc.malloc.mxfast tunable works.
d8307d
-   Copyright (C) 2018, 2019 Free Software Foundation, Inc.
d8307d
+   Copyright (C) 2019 Free Software Foundation, Inc.
d8307d
    This file is part of the GNU C Library.
d8307d
 
d8307d
    The GNU C Library is free software; you can redistribute it and/or
d8307d
@@ -21,14 +21,14 @@
d8307d
    the fast bins.  */
d8307d
 
d8307d
 #include <malloc.h>
d8307d
-#include <assert.h>
d8307d
+#include <support/check.h>
d8307d
 
d8307d
 int
d8307d
-do_test(void)
d8307d
+do_test (void)
d8307d
 {
d8307d
   struct mallinfo m;
d8307d
-  char * volatile p1;
d8307d
-  char * volatile p2;
d8307d
+  char *volatile p1;
d8307d
+  char *volatile p2;
d8307d
 
d8307d
   /* Arbitrary value; must be in default fastbin range.  */
d8307d
   p1 = malloc (3);
d8307d
@@ -36,10 +36,10 @@ do_test(void)
d8307d
   p2 = malloc (512);
d8307d
   free (p1);
d8307d
 
d8307d
-  m = mallinfo();
d8307d
+  m = mallinfo ();
d8307d
 
d8307d
   /* This will fail if there are any blocks in the fastbins.  */
d8307d
-  assert (m.smblks == 0);
d8307d
+  TEST_COMPARE (m.smblks, 0);
d8307d
 
d8307d
   /* To keep gcc happy.  */
d8307d
   free (p2);