From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by sourceware.org (Postfix) with ESMTPS id 11196384640E for ; Fri, 10 May 2024 12:30:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11196384640E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 11196384640E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715344209; cv=none; b=yBraSAbCVVCY+ALE244viO/ZJC+q5x+QPlJA0tjNzmTqU8wKUQAU7tqaAGcPGuDwVH0DmwNL1BXZQ6POeNLWViyHeFu3jODP5dMLa3f78ZLCgIXPcFipKGr/uzUsBPIZ4pZxwnBcswoMUWgykr0Y1cgIflyeP4KoyDKWsonrjL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715344209; c=relaxed/simple; bh=UUlMCvmnBQeYn5VnOTHYG1F1M8S/gmNwgMOADM/hF9k=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=o/6G9kOmk6lmmG4t1MoDe/QBK7Bm2a/1DIJhMxNiJMWLkDY4QZUikCjztZRg2vu4z+LM56pR1FM3G/uGqYF5RCAKIMpBvKvp3J21gwQQPpJyA1OMsGR7PiL7Q7r3SUVy9knPAE0GCkyku3pTcNYnYfUcz8IXa3SPpZ9z8I/6RLo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-de5a7b18acdso1938768276.3 for ; Fri, 10 May 2024 05:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715344205; x=1715949005; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1ALHOd/Bv9QyMc4PDFzNNPVfb6hpJY5ssihxP1zaQqM=; b=iNzMHt7vS5tCqBuOGo99siJ5ceiGqfw8RQe1Ei3u4R70buRrIbCmz/7DfXXMRIsOXc A7t/pY1EDGwahhEPKdJv7RP8J8egtD9wT5fzFWaD5ORG/cWquRcqScKblg6dLyMtrCTt 55XYxvPBpNQ6ZxegS2I2EKBJ6VKkLv+2RFtAhtN3v0NDIiK+ZknGpA5dHkLnNBU4Svku HC4QElSS8rT4ASLXxHCurxj3vR+OdKEl8uaoiTzpE2u171a2ab8H5hfRJ9+G9IEY2C1g d2ZqDoYEGrS7XooF8JidvlvEk3MI2FonyK/6UEk3eLLRwc6LgoNx2LqUKtUUOLAWQg8/ AO9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715344205; x=1715949005; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1ALHOd/Bv9QyMc4PDFzNNPVfb6hpJY5ssihxP1zaQqM=; b=bCixAR6SqV2tGTfWdS+dcJsmLpDQCjjN4qODYYRm0xLfXhr79/GprpJn/VGVjDnN1f lCqb3WDgDSrQuON7im3QaX1BKklLUpEIV9R4/u/kLVH3U38K2/ZEM38YQBBw7IdDFMt3 SlQQIDzC2s3o+BP4YgzHQgkqeVpPM+zVDoCMOXcrNSALxDcW2QUO/w5dY8+MAM5yli1I lImtoM2cSbZxFx8Nlc8SzGzkT9OfQAjTcwJlJ2DP3JgYTQQzmPFsrfAkT0y1Lv8yO73O 2MEmjWNASaXtuB/NXNBPnQroVMppC8HY7HXFYo5Qs0/jFyNxkRxyKG+o/tIR94yP/MQs RG8A== X-Gm-Message-State: AOJu0Yy+iO3KtGqywEpMJFeKsLCrZsde6oHQuB5L20EN836etxYR5/JH 0JrfLR7tWqrgtWHuw0LWNM8W56H40rRCV0cAZLovwqcgVsx9ScTgqQcKaBcdnz3HzkX2P0F+g0R TzKkkV10CZ0Cjz7hZW9TKpGDFN05ppQ== X-Google-Smtp-Source: AGHT+IG14uX5KqrmsezZw37bmo4Z4Hop2lnncQyUWy3DLDXXqXq2dSQRfNkp47coPWGcN4LQt0Lie1OtJ0ITMgwxDV8= X-Received: by 2002:a25:ad46:0:b0:de5:a15a:7118 with SMTP id 3f1490d57ef6-dee4f354ff8mr2343692276.42.1715344205053; Fri, 10 May 2024 05:30:05 -0700 (PDT) MIME-Version: 1.0 References: <20240510034336.1244647-1-hjl.tools@gmail.com> <2ed0bd8b-6c6f-453b-bb9e-a4f4a241d121@redhat.com> In-Reply-To: <2ed0bd8b-6c6f-453b-bb9e-a4f4a241d121@redhat.com> From: "H.J. Lu" Date: Fri, 10 May 2024 05:29:28 -0700 Message-ID: Subject: Re: [PATCH] malloc/Makefile: Split and sort tests To: "Carlos O'Donell" Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3018.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, May 10, 2024 at 5:08=E2=80=AFAM Carlos O'Donell = wrote: > > On 5/9/24 23:43, H.J. Lu wrote: > > Put each test on a separate line and sort tests. > > Thank you for cleaning this up! > > As of May 2023 splitting Makefile lines is consensus: > https://sourceware.org/glibc/wiki/Consensus#Trivial_Bug-Fix_Changes > > You can push these changes as fast as you can make them. > > Please post [COMMITTED] patches to the list. Will do in the future. > Reviewed-by: Carlos O'Donell Thanks. > > Signed-off-by: H.J. Lu > > --- > > malloc/Makefile | 166 +++++++++++++++++++++++++++++------------------- > > 1 file changed, 102 insertions(+), 64 deletions(-) > > > > diff --git a/malloc/Makefile b/malloc/Makefile > > index c83ade5f10..77ba1a9109 100644 > > --- a/malloc/Makefile > > +++ b/malloc/Makefile > > @@ -24,60 +24,92 @@ include ../Makeconfig > > > > dist-headers :=3D malloc.h > > headers :=3D $(dist-headers) obstack.h mcheck.h > > -tests :=3D mallocbug tst-malloc tst-valloc tst-calloc tst-obstack \ > > - tst-malloc-check tst-mallocfork tst-trim1 \ > > - tst-malloc-usable tst-realloc tst-reallocarray tst-posix_memalig= n \ > > - tst-pvalloc tst-pvalloc-fortify tst-memalign tst-mallopt \ > > - tst-malloc-backtrace tst-malloc-thread-exit \ > > - tst-malloc-thread-fail tst-malloc-fork-deadlock \ > > - tst-mallocfork2 \ > > - tst-mallocfork3 \ > > - tst-interpose-nothread \ > > - tst-interpose-thread \ > > - tst-alloc_buffer \ > > - tst-free-errno \ > > - tst-malloc-tcache-leak \ > > - tst-malloc_info tst-mallinfo2 \ > > - tst-malloc-too-large \ > > - tst-malloc-stats-cancellation \ > > - tst-tcfree1 tst-tcfree2 tst-tcfree3 \ > > - tst-safe-linking \ > > - tst-mallocalign1 \ > > - tst-memalign-2 \ > > - tst-memalign-3 \ > > - tst-aligned-alloc > > +tests :=3D \ > > + mallocbug \ > > + tst-aligned-alloc \ > > + tst-alloc_buffer \ > > + tst-calloc \ > > + tst-free-errno \ > > + tst-interpose-nothread \ > > + tst-interpose-thread \ > > + tst-malloc \ > > + tst-malloc-backtrace \ > > + tst-malloc-check \ > > + tst-malloc-fork-deadlock \ > > + tst-malloc-stats-cancellation \ > > + tst-malloc-tcache-leak \ > > + tst-malloc-thread-exit \ > > + tst-malloc-thread-fail \ > > + tst-malloc-too-large \ > > + tst-malloc-usable \ > > + tst-malloc_info tst-mallinfo2 \ > > + tst-mallocalign1 \ > > + tst-mallocfork \ > > + tst-mallocfork2 \ > > + tst-mallocfork3 \ > > + tst-mallopt \ > > + tst-memalign \ > > + tst-memalign-2 \ > > + tst-memalign-3 \ > > + tst-obstack \ > > + tst-posix_memalign \ > > + tst-pvalloc \ > > + tst-pvalloc-fortify \ > > + tst-realloc \ > > + tst-reallocarray \ > > + tst-safe-linking \ > > + tst-tcfree1 tst-tcfree2 tst-tcfree3 \ > > + tst-trim1 \ > > + tst-valloc \ > > +# tests > > > > tests-static :=3D \ > > - tst-interpose-static-nothread \ > > - tst-interpose-static-thread \ > > - tst-aligned-alloc-static > > + tst-aligned-alloc-static \ > > + tst-interpose-static-nothread \ > > + tst-interpose-static-thread \ > > +# tests-static > > > > # Test for the malloc_set_state symbol removed in glibc 2.25. > > ifeq ($(have-GLIBC_2.23)$(build-shared),yesyes) > > -tests +=3D tst-mallocstate tst-compathooks-off tst-compathooks-on > > +tests +=3D \ > > + tst-compathooks-off \ > > + tst-compathooks-on \ > > + tst-mallocstate \ > > +# tests > > endif > > > > tests-internal :=3D tst-scratch_buffer > > > > # The dynarray framework is only available inside glibc. > > tests-internal +=3D \ > > - tst-dynarray \ > > - tst-dynarray-fail \ > > - tst-dynarray-at-fail \ > > + tst-dynarray \ > > + tst-dynarray-at-fail \ > > + tst-dynarray-fail \ > > +# tests-internal > > > > -tests +=3D tst-malloc-usable-tunables tst-mxfast > > +tests +=3D \ > > + tst-malloc-usable-tunables \ > > + tst-mxfast \ > > +# tests > > > > tests +=3D $(tests-static) > > test-srcs =3D tst-mtrace > > > > # These tests either are run with MALLOC_CHECK_=3D3 by default or do n= ot work > > # with MALLOC_CHECK_=3D3 because they expect a specific failure. > > -tests-exclude-malloc-check =3D tst-malloc-check tst-malloc-usable \ > > - tst-mxfast tst-safe-linking \ > > - tst-compathooks-off tst-compathooks-on tst-memalign-2 tst-memalig= n-3 \ > > - tst-mallocfork2 \ > > - tst-mallocfork3 \ > > - tst-malloc-tcache-leak > > +tests-exclude-malloc-check =3D \ > > + tst-compathooks-off \ > > + tst-compathooks-on \ > > + tst-malloc-check \ > > + tst-malloc-tcache-leak \ > > + tst-malloc-usable \ > > + tst-mallocfork2 \ > > + tst-mallocfork3 \ > > + tst-memalign-2 \ > > + tst-memalign-3 \ > > + tst-mxfast \ > > + tst-safe-linking \ > > +# tests-exclude-malloc-check > > > > # Run all tests with MALLOC_CHECK_=3D3 > > tests-malloc-check =3D $(filter-out $(tests-exclude-malloc-check) \ > > @@ -87,18 +119,19 @@ tests-malloc-check =3D $(filter-out $(tests-exclud= e-malloc-check) \ > > # the Transparent Huge Pages support (1) or automatic huge page suppor= t (2). > > # We need exclude some tests that define the ENV vars. > > tests-exclude-hugetlb1 =3D \ > > - tst-compathooks-off \ > > - tst-compathooks-on \ > > - tst-interpose-nothread \ > > - tst-interpose-thread \ > > - tst-interpose-static-nothread \ > > - tst-interpose-static-thread \ > > - tst-malloc-usable \ > > - tst-malloc-usable-tunables \ > > - tst-mallocstate \ > > - tst-malloc-tcache-leak \ > > - tst-mallocfork2 \ > > - tst-mallocfork3 > > + tst-compathooks-off \ > > + tst-compathooks-on \ > > + tst-interpose-nothread \ > > + tst-interpose-static-nothread \ > > + tst-interpose-static-thread \ > > + tst-interpose-thread \ > > + tst-malloc-tcache-leak \ > > + tst-malloc-usable \ > > + tst-malloc-usable-tunables \ > > + tst-mallocfork2 \ > > + tst-mallocfork3 \ > > + tst-mallocstate \ > > +# tests-exclude-hugetlb1 > > # The tst-free-errno relies on the used malloc page size to mmap an > > # overlapping region. > > tests-exclude-hugetlb2 =3D \ > > @@ -114,22 +147,25 @@ ifeq ($(have-GLIBC_2.23)$(build-shared),yesyes) > > # Tests that don't play well with mcheck. They are either bugs in mch= eck or > > # the tests expect specific internal behavior that is changed due to l= inking to > > # libmcheck.a. > > -tests-exclude-mcheck =3D tst-mallocstate \ > > - tst-safe-linking \ > > - tst-malloc-backtrace \ > > - tst-malloc-fork-deadlock \ > > - tst-malloc-stats-cancellation \ > > - tst-malloc-tcache-leak \ > > - tst-malloc-thread-exit \ > > - tst-malloc-thread-fail \ > > - tst-malloc-usable-tunables \ > > - tst-malloc_info \ > > - tst-compathooks-off tst-compathooks-on \ > > - tst-memalign-2 \ > > - tst-memalign-3 \ > > - tst-mxfast \ > > - tst-mallocfork2 \ > > - tst-mallocfork3 > > +tests-exclude-mcheck =3D \ > > + tst-compathooks-off \ > > + tst-compathooks-on \ > > + tst-malloc-backtrace \ > > + tst-malloc-fork-deadlock \ > > + tst-malloc-stats-cancellation \ > > + tst-malloc-tcache-leak \ > > + tst-malloc-thread-exit \ > > + tst-malloc-thread-fail \ > > + tst-malloc-usable-tunables \ > > + tst-malloc_info \ > > + tst-mallocfork2 \ > > + tst-mallocfork3 \ > > + tst-mallocstate \ > > + tst-memalign-2 \ > > + tst-memalign-3 \ > > + tst-mxfast \ > > + tst-safe-linking \ > > +# tests-exclude-mcheck > > > > tests-mcheck =3D $(filter-out $(tests-exclude-mcheck) $(tests-static),= $(tests)) > > endif > > @@ -159,10 +195,12 @@ extra-libs-others =3D $(extra-libs) > > extra-test-objs +=3D \ > > tst-interpose-aux-nothread.o \ > > tst-interpose-aux-thread.o \ > > +# extra-test-objs > > > > test-extras =3D \ > > tst-interpose-aux-nothread \ > > tst-interpose-aux-thread \ > > +# test-extras > > > > libmemusage-routines =3D memusage > > libmemusage-inhibit-o =3D $(filter-out .os,$(object-suffixes)) > > -- > Cheers, > Carlos. > --=20 H.J.