From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82975 invoked by alias); 18 Nov 2019 18:04:30 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 82959 invoked by uid 89); 18 Nov 2019 18:04:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: aloka.lostca.se Received: from aloka.lostca.se (HELO aloka.lostca.se) (178.63.46.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Nov 2019 18:04:28 +0000 Received: from aloka.lostca.se (aloka [127.0.0.1]) by aloka.lostca.se (Postfix) with ESMTP id 8748F15E7F for ; Mon, 18 Nov 2019 18:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lostca.se; h=date:from:to :subject:message-id:mime-version:content-type; s=howrah; bh=wco+ 4RmS/3fiCE0yM6/HINg6HU4=; b=mmXkF64mW9meW4CGz1mS9LhHDmWyvks5YkZo mZ2Jb27OOFnHY7JCTFsK7JOM9Htmu+pUg824r1c3f0FzpRsXDeqF+m+ko+1MwFVj EMSCPjGawEDZlFXI+eTcvMcCwQBCZDsxHtY1tI7fdd5CogZcmIZbc8YWg1FqyAR2 nzEgMNQ= Received: from localhost (unknown [IPv6:2a01:4f8:120:624c::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aloka.lostca.se (Postfix) with ESMTPSA id 51FB115E7E for ; Mon, 18 Nov 2019 18:04:26 +0000 (UTC) Date: Tue, 01 Jan 2019 00:00:00 -0000 From: Arjun Shankar To: libc-stable@sourceware.org Subject: [2.29 COMMITTED] malloc: Various cleanups for malloc/tst-mxfast Message-ID: <20191118180425.GD73440@aloka.lostca.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00015.txt.bz2 (cherry picked from commit f9769a239784772453d595bc2f4bed8739810e06) --- ChangeLog | 8 ++++++++ malloc/Makefile | 3 +-- malloc/tst-mxfast.c | 14 +++++++------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbdc566fa1..4a0af95f7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2019-08-15 Florian Weimer + + * 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 * elf/dl-tunables.list: Add glibc.malloc.mxfast. diff --git a/malloc/Makefile b/malloc/Makefile index 26947feccf..b4409aa670 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -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 diff --git a/malloc/tst-mxfast.c b/malloc/tst-mxfast.c index 7a371d2f9d..7a7750bc71 100644 --- a/malloc/tst-mxfast.c +++ b/malloc/tst-mxfast.c @@ -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,14 +21,14 @@ the fast bins. */ #include -#include +#include int -do_test(void) +do_test (void) { struct mallinfo m; - char * volatile p1; - char * volatile p2; + char *volatile p1; + char *volatile p2; /* Arbitrary value; must be in default fastbin range. */ p1 = malloc (3); @@ -36,10 +36,10 @@ do_test(void) p2 = malloc (512); free (p1); - m = mallinfo(); + 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); -- 2.21.0