From patchwork Thu Jun 19 08:51:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 114719 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F375384D14B for ; Thu, 19 Jun 2025 08:52:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F375384D14B Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZFJzR3Mt X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 3A0C03850B19 for ; Thu, 19 Jun 2025 08:51:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A0C03850B19 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3A0C03850B19 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750323071; cv=none; b=CSU31attWnFufim/FT019kl/kd7EfJ2s9YKSuiYCXPecDCooNICkf8i5Z90BkkLBYht+MedtzQU54MiM0IA47E1R4+9ZQu+XUPTpdGncrCypE3N/RUQTRL9WRn8LRLz8nFwtx9cZMAvkC5YMwGyt5aA5AEqnTSQdkxxDCrwEWnA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750323071; c=relaxed/simple; bh=58CR0WTh2GzlLnrj43sgMHDQ39DWGCaAYY+dSLodAro=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Qj4/n2vHpYFPNuLWzky/v6x92cGQ99EavccQBVSr+7mZfr1Mu1iXof4q99K0EYAJyYmHXngseWowzllc5LsukXg74iYTnfaFOfJ9onae7b5aBuhDnQLO7fMkSJdiIMhZDWIshR71wAO6p7insi0ROmfiGQqJzdS1JYJ8428SSbs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A0C03850B19 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1750323071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=Sfse1zjEdzNnlwXMO43LHzA2wDw74f8oyZtwHhrRUec=; b=ZFJzR3MtH+GzsYEJ7scrQ/TQf8Km/GFbZmiSPy9Xwk3NONRVyoCSTAAcWRpdC3KabZkdOA m/aVTIcPpf3DsbiO47x0GajlJ+WEPV9CTAB3hGbSOg4tiZhLVE8qa3LIhk/T3FaEgfuj2k Zut9Yu0Y9N4hFTY5KwPtn2bPPlggX1M= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-227-Is5ATW_VOs2EzQMJdMDCcg-1; Thu, 19 Jun 2025 04:51:09 -0400 X-MC-Unique: Is5ATW_VOs2EzQMJdMDCcg-1 X-Mimecast-MFC-AGG-ID: Is5ATW_VOs2EzQMJdMDCcg_1750323068 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7B9921800282; Thu, 19 Jun 2025 08:51:08 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.45.224.8]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1C914195608F; Thu, 19 Jun 2025 08:51:06 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Cc: Cupertino Miranda , Wilco Dijkstra Subject: [PATCH] malloc: Link large tcache tests with $(shared-thread-library) Date: Thu, 19 Jun 2025 10:51:03 +0200 Message-ID: <87plf0p11k.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: E26VLkIHfLa4QhJw-8Dpk_ihwrLqwLAk6yDY1iGiwY8_1750323068 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Introduce tests-link-with-libpthread to list tests that require linking with libpthread, and use that to generate dependencies on $(shared-thread-library) for all multi-threaded tests. Fixes build failures of commit cde5caa4bb21d5c474b9e4762cc847bcbc70e481 ("malloc: add testing for large tcache support") on Hurd. Reviewed-by: H.J. Lu --- malloc/Makefile | 110 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 58 insertions(+), 52 deletions(-) base-commit: 0ef7965e5b251473f7d451739324c45b0fefaf1a diff --git a/malloc/Makefile b/malloc/Makefile index 2f232f9238..83f6c873e8 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -235,32 +235,61 @@ libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes)) libc_malloc_debug-routines = malloc-debug $(sysdep_malloc_debug_routines) libc_malloc_debug-inhibit-o = $(filter-out .os,$(object-suffixes)) -$(objpfx)tst-malloc-backtrace: $(shared-thread-library) -$(objpfx)tst-malloc-thread-exit: $(shared-thread-library) -$(objpfx)tst-malloc-thread-fail: $(shared-thread-library) -$(objpfx)tst-mallocfork3: $(shared-thread-library) -$(objpfx)tst-mallocfork3-mcheck: $(shared-thread-library) -$(objpfx)tst-malloc-fork-deadlock: $(shared-thread-library) -$(objpfx)tst-malloc-stats-cancellation: $(shared-thread-library) -$(objpfx)tst-malloc-backtrace-mcheck: $(shared-thread-library) -$(objpfx)tst-malloc-thread-exit-mcheck: $(shared-thread-library) -$(objpfx)tst-malloc-thread-fail-mcheck: $(shared-thread-library) -$(objpfx)tst-malloc-fork-deadlock-mcheck: $(shared-thread-library) -$(objpfx)tst-malloc-stats-cancellation-mcheck: $(shared-thread-library) -$(objpfx)tst-mallocfork3-malloc-check: $(shared-thread-library) -$(objpfx)tst-malloc-backtrace-malloc-check: $(shared-thread-library) -$(objpfx)tst-malloc-thread-exit-malloc-check: $(shared-thread-library) -$(objpfx)tst-malloc-thread-fail-malloc-check: $(shared-thread-library) -$(objpfx)tst-malloc-fork-deadlock-malloc-check: $(shared-thread-library) -$(objpfx)tst-malloc-stats-cancellation-malloc-check: $(shared-thread-library) -$(objpfx)tst-malloc-thread-exit-malloc-hugetlb1: $(shared-thread-library) -$(objpfx)tst-malloc-thread-fail-malloc-hugetlb1: $(shared-thread-library) -$(objpfx)tst-malloc-fork-deadlock-malloc-hugetlb1: $(shared-thread-library) -$(objpfx)tst-malloc-stats-cancellation-malloc-hugetlb1: $(shared-thread-library) -$(objpfx)tst-malloc-thread-exit-malloc-hugetlb2: $(shared-thread-library) -$(objpfx)tst-malloc-thread-fail-malloc-hugetlb2: $(shared-thread-library) -$(objpfx)tst-malloc-fork-deadlock-malloc-hugetlb2: $(shared-thread-library) -$(objpfx)tst-malloc-stats-cancellation-malloc-hugetlb2: $(shared-thread-library) +tests-link-with-libpthread = \ + tst-aligned-alloc-random-thread \ + tst-aligned-alloc-random-thread-cross \ + tst-aligned-alloc-random-thread-cross-malloc-check \ + tst-aligned-alloc-random-thread-cross-malloc-hugetlb1 \ + tst-aligned-alloc-random-thread-cross-malloc-hugetlb2 \ + tst-aligned-alloc-random-thread-malloc-check \ + tst-aligned-alloc-random-thread-malloc-hugetlb1 \ + tst-aligned-alloc-random-thread-malloc-hugetlb2 \ + tst-interpose-thread \ + tst-interpose-thread-malloc-check \ + tst-interpose-thread-mcheck \ + tst-malloc-backtrace \ + tst-malloc-backtrace-malloc-check \ + tst-malloc-backtrace-mcheck \ + tst-malloc-fork-deadlock \ + tst-malloc-fork-deadlock-malloc-check \ + tst-malloc-fork-deadlock-malloc-hugetlb1 \ + tst-malloc-fork-deadlock-malloc-hugetlb2 \ + tst-malloc-fork-deadlock-mcheck \ + tst-malloc-stats-cancellation \ + tst-malloc-stats-cancellation-malloc-check \ + tst-malloc-stats-cancellation-malloc-hugetlb1 \ + tst-malloc-stats-cancellation-malloc-hugetlb2 \ + tst-malloc-stats-cancellation-mcheck \ + tst-malloc-tcache-leak \ + tst-malloc-thread-exit \ + tst-malloc-thread-exit-malloc-check \ + tst-malloc-thread-exit-malloc-hugetlb1 \ + tst-malloc-thread-exit-malloc-hugetlb2 \ + tst-malloc-thread-exit-mcheck \ + tst-malloc-thread-fail \ + tst-malloc-thread-fail-malloc-check \ + tst-malloc-thread-fail-malloc-hugetlb1 \ + tst-malloc-thread-fail-malloc-hugetlb2 \ + tst-malloc-thread-fail-mcheck \ + tst-malloc_info \ + tst-malloc_info-malloc-check \ + tst-malloc_info-malloc-hugetlb1 \ + tst-malloc_info-malloc-hugetlb2 \ + tst-malloc_info-mcheck \ + tst-mallocfork2 \ + tst-mallocfork2-malloc-check \ + tst-mallocfork3 \ + tst-mallocfork3-malloc-check \ + tst-mallocfork3-mcheck \ + tst-memalign-3 \ + tst-memalign-3-malloc-hugetlb1 \ + tst-memalign-3-malloc-hugetlb2 \ +# tests-link-with-libpthread + +$(addprefix $(objpfx), $(tests-link-with-libpthread)): $(shared-thread-library) +# Not all these tests are actually built, see tests-exclude-largetcache. +$(tests-link-with-libpthread:%=$(objpfx)%-malloc-largetcache): \ + $(shared-thread-library) # These should be removed by `make clean'. extra-objs = mcheck-init.o libmcheck.a @@ -388,12 +417,9 @@ $(objpfx)tst-interpose-nothread: $(objpfx)tst-interpose-aux-nothread.o $(objpfx)tst-interpose-nothread-mcheck: $(objpfx)tst-interpose-aux-nothread.o $(objpfx)tst-interpose-nothread-malloc-check: \ $(objpfx)tst-interpose-aux-nothread.o -$(objpfx)tst-interpose-thread: \ - $(objpfx)tst-interpose-aux-thread.o $(shared-thread-library) -$(objpfx)tst-interpose-thread-mcheck: \ - $(objpfx)tst-interpose-aux-thread.o $(shared-thread-library) -$(objpfx)tst-interpose-thread-malloc-check: \ - $(objpfx)tst-interpose-aux-thread.o $(shared-thread-library) +$(objpfx)tst-interpose-thread: $(objpfx)tst-interpose-aux-thread.o +$(objpfx)tst-interpose-thread-mcheck: $(objpfx)tst-interpose-aux-thread.o +$(objpfx)tst-interpose-thread-malloc-check: $(objpfx)tst-interpose-aux-thread.o $(objpfx)tst-interpose-static-nothread: $(objpfx)tst-interpose-aux-nothread.o $(objpfx)tst-interpose-static-thread: \ $(objpfx)tst-interpose-aux-thread.o $(static-thread-library) @@ -410,18 +436,6 @@ $(objpfx)tst-dynarray-fail-mem.out: $(objpfx)tst-dynarray-fail.out $(common-objpfx)malloc/mtrace $(objpfx)tst-dynarray-fail.mtrace > $@; \ $(evaluate-test) -$(objpfx)tst-malloc-tcache-leak: $(shared-thread-library) -$(objpfx)tst-malloc_info: $(shared-thread-library) -$(objpfx)tst-mallocfork2: $(shared-thread-library) -$(objpfx)tst-malloc_info-mcheck: $(shared-thread-library) -$(objpfx)tst-malloc_info-malloc-check: $(shared-thread-library) -$(objpfx)tst-mallocfork2-malloc-check: $(shared-thread-library) -$(objpfx)tst-malloc_info-malloc-hugetlb1: $(shared-thread-library) -$(objpfx)tst-malloc_info-malloc-hugetlb2: $(shared-thread-library) -$(objpfx)tst-memalign-3: $(shared-thread-library) -$(objpfx)tst-memalign-3-malloc-hugetlb1: $(shared-thread-library) -$(objpfx)tst-memalign-3-malloc-hugetlb2: $(shared-thread-library) - tst-compathooks-on-ENV = LD_PRELOAD=$(objpfx)libc_malloc_debug.so tst-compathooks-on-mcheck-ENV = LD_PRELOAD=$(objpfx)libc_malloc_debug.so tst-compathooks-on-malloc-check-ENV = \ @@ -435,15 +449,7 @@ $(objpfx)tst-mallocstate: $(objpfx)libc_malloc_debug.so $(objpfx)tst-mallocstate-malloc-check: $(objpfx)libc_malloc_debug.so $(objpfx)tst-aligned-alloc-random.out: $(objpfx)tst-aligned_alloc-lib.so -$(objpfx)tst-aligned-alloc-random-thread: $(shared-thread-library) -$(objpfx)tst-aligned-alloc-random-thread-malloc-check: $(shared-thread-library) -$(objpfx)tst-aligned-alloc-random-thread-malloc-hugetlb1: $(shared-thread-library) -$(objpfx)tst-aligned-alloc-random-thread-malloc-hugetlb2: $(shared-thread-library) $(objpfx)tst-aligned-alloc-random-thread.out: $(objpfx)tst-aligned_alloc-lib.so -$(objpfx)tst-aligned-alloc-random-thread-cross: $(shared-thread-library) -$(objpfx)tst-aligned-alloc-random-thread-cross-malloc-check: $(shared-thread-library) -$(objpfx)tst-aligned-alloc-random-thread-cross-malloc-hugetlb1: $(shared-thread-library) -$(objpfx)tst-aligned-alloc-random-thread-cross-malloc-hugetlb2: $(shared-thread-library) $(objpfx)tst-aligned-alloc-random-thread-cross.out: $(objpfx)tst-aligned_alloc-lib.so $(objpfx)tst-malloc-random.out: $(objpfx)tst-aligned_alloc-lib.so