Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2224008/?format=api
{ "id": 2224008, "url": "http://patchwork.ozlabs.org/api/patches/2224008/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260416143027.1881673-2-yury.khrustalev@arm.com/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260416143027.1881673-2-yury.khrustalev@arm.com>", "list_archive_url": null, "date": "2026-04-16T14:30:20", "name": "[v3,1/8] tests: Allow tests to append tunables", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "af35baf0dd71ec5681414dab2960c2bf22de9275", "submitter": { "id": 88214, "url": "http://patchwork.ozlabs.org/api/people/88214/?format=api", "name": "Yury Khrustalev", "email": "yury.khrustalev@arm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20260416143027.1881673-2-yury.khrustalev@arm.com/mbox/", "series": [ { "id": 500171, "url": "http://patchwork.ozlabs.org/api/series/500171/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=500171", "date": "2026-04-16T14:30:19", "name": "tests: Allow tests to append tunables", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/500171/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2224008/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2224008/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "libc-alpha@sourceware.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "libc-alpha@sourceware.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256\n header.s=foss header.b=Lq8pVgz4;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key,\n unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256\n header.s=foss header.b=Lq8pVgz4", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=arm.com", "sourceware.org; spf=pass smtp.mailfrom=arm.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=217.140.110.172" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fxL6V6Lzkz1yG9\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 00:31:14 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id C1D954B9DB4D\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 14:31:12 +0000 (GMT)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by sourceware.org (Postfix) with ESMTP id 4A0284BA23F9\n for <libc-alpha@sourceware.org>; Thu, 16 Apr 2026 14:30:38 +0000 (GMT)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 313A725DF;\n Thu, 16 Apr 2026 07:30:32 -0700 (PDT)", "from fdebian.localdomain (unknown [10.57.18.61])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0F5743F7D8;\n Thu, 16 Apr 2026 07:30:36 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org C1D954B9DB4D", "OpenDKIM Filter v2.11.0 sourceware.org 4A0284BA23F9" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 4A0284BA23F9", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 4A0284BA23F9", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776349838; cv=none;\n b=MjrMvuD33U+WpiRHHbSmLHQ2Ror0ZfEDDlMyZlOcwKY7EgJisPy8APkCBgacFekoAd+IJEHDRYfi6x/VCkzTwmQq1lqODsNziPJR0iTxo6ePgWHiU8ct3KbDugjUbDf5uXu3B8T8TJFLs1OUfVrJxRuIvRTM5nWxL5ZRCrzX68k=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776349838; c=relaxed/simple;\n bh=8+wpiPu78FZcAmvDb1WFp1gTTQV6Y/az2bqyYXoheEg=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=b393Rjs/dj06HY64RDTKRJDpgTg/cbc947clldoLs6hYf0Y4T7unXYgzmxU43HgQocQJermv3yj6noHZrNWGld7PpQGial6m/bwMUUzRkkxXPat0aOxOqJbjCB/BYO+WwS/FLdBoW+7nSaIa2zT9me+xU0UU5X1EhYeyrnvbASQ=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss;\n t=1776349837; bh=8+wpiPu78FZcAmvDb1WFp1gTTQV6Y/az2bqyYXoheEg=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=Lq8pVgz4yKKshCF5Ur3TF6ltY4CfWYDyu4JliHSHP2VoIqz15MjknUGFCSFmJBXHa\n 2Qe0BIB/Vfg+Bij7fMdj+nZZa6r28fm0hwu1UhZwYSbdWMwkyUBakupOyGY1os0S4/\n TsOAo93D2lhKLpQiF9hi5zyF+s6OJQC+LTEsfk68=", "From": "Yury Khrustalev <yury.khrustalev@arm.com>", "To": "libc-alpha@sourceware.org", "Cc": "Florian Weimer <fweimer@redhat.com>, Carlos O'Donell <carlos@redhat.com>,\n Wilco Dijkstra <wilco.dijkstra@arm.com>", "Subject": "[PATCH v3 1/8] tests: Allow tests to append tunables", "Date": "Thu, 16 Apr 2026 15:30:20 +0100", "Message-ID": "<20260416143027.1881673-2-yury.khrustalev@arm.com>", "X-Mailer": "git-send-email 2.47.3", "In-Reply-To": "<20260416143027.1881673-1-yury.khrustalev@arm.com>", "References": "<20260416143027.1881673-1-yury.khrustalev@arm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libc-alpha@sourceware.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>", "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>", "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>", "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>", "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org" }, "content": "Many tests use Glibc tunables, and the values of the tunables are\nprovided via the GLIBC_TUNABLES env variable. Tests set it in\nmakefiles using\n\n tst-foo-ENV = GLIBC_TUNABLES=tunable=value\n\nThis overwrites environment for this test, so if another env var is\nset elsewhere, one of these changes would be lost. The correct way\nshould be to append to test's environment:\n\n tst-foo-ENV += GLIBC_TUNABLES=tunable=value\n\nHowever, if two or more tunables need to be set for the same test,\nthe 'tunable=value' part should be appended to previously defined\nGLIBC_TUNABLES env variable, and it's not easy to achieve this via\nexisting tools available for tests.\n\nAdditionally, there are cases when it is useful to set ambient env\nvar GLIBC_TUNABLES in order to apply it to most of the tests except\nthose that require specific tunables. The existing mechanism that\nrelies on tst-foo-ENV would always override the ambient env var\neven when it is not desirable.\n\nTo address all of this, in this commit we add support for using\nconstructs like\n\n tst-foo-TUNABLES += tunable=value\n\nUsing this, the test will receive appropriate GLIBC_TUNABLES contents,\nand if there is an ambient env var GLIBC_TUNABLES, its value will be\nprepended to the env var used by the test. Even if the ambient env var\ncontains the same tunable that is used by a test, the test's value will\noverride the ambient value, and the test will be executed correctly.\n\nAdditionally, we support cases when tests must have specific value\nof the GLIBC_TUNABLES env var (ignoring any ambient value):\n\n tst-foo-TUNABLES-only += tunable=value\n\nThe existing mechanism that uses tst-foo-ENV will continue to work,\nhowever if the same test uses both, the new mechanism will override\nthe old one.\n\nAdditional benefit is that the code in makefiles becomes shorter.\n\nWe also change tunable handling for malloc tests in this commit.\n---\n Rules | 40 +++++++++++++++++++++++++++++++++-------\n benchtests/Makefile | 2 +-\n malloc/Makefile | 10 ++++++----\n 3 files changed, 40 insertions(+), 12 deletions(-)", "diff": "diff --git a/Rules b/Rules\nindex 9d8587a148..a5de1a1092 100644\n--- a/Rules\n+++ b/Rules\n@@ -348,21 +348,47 @@ $(1)-malloc-check-ENV = MALLOC_CHECK_=3 \\\n endef\n $(foreach t,$(tests-malloc-check),$(eval $(call malloc-check-ENVS,$(t))))\n \n+# Concatenate elements in the list using colon.\n+# Two spaces after 'subst' are intentional.\n+emptystring :=\n+spacestring := $(emptystring) # one space\n+define join-with-col\n+$(subst $(spacestring),:,$(strip $(1)))\n+endef\n+\n+# Generate environment variable GLIBC_TUNABLES to be appended to\n+# the test environment appending tunables specifically added for\n+# each test to the ambient GLIBC_TUNABLES environment variable.\n+# The *-TUNABLES-only can be used by a test to override any ambient\n+# tunables.\n+define test-tun-joined\n+$(call join-with-col,$($*-TUNABLES))\n+endef\n+define test-tunables-all\n+$(if $($*-TUNABLES),$(if $(GLIBC_TUNABLES),GLIBC_TUNABLES=$(GLIBC_TUNABLES):$(test-tun-joined),GLIBC_TUNABLES=$(test-tun-joined)),)\n+endef\n+define test-tunables-only\n+GLIBC_TUNABLES=$(call join-with-col,$($*-TUNABLES-only))\n+endef\n+define test-tunables\n+$(if $($*-TUNABLES-only),$(test-tunables-only),$(test-tunables-all))\n+endef\n+\n # All malloc-hugetlb1 tests will be run with GLIBC_TUNABLES=glibc.malloc.hugetlb=1\n define malloc-hugetlb1-ENVS\n-$(1)-malloc-hugetlb1-ENV += GLIBC_TUNABLES=glibc.malloc.hugetlb=1\n+$(1)-malloc-hugetlb1-TUNABLES += glibc.malloc.hugetlb=1\n endef\n $(foreach t,$(tests-malloc-hugetlb1),$(eval $(call malloc-hugetlb1-ENVS,$(t))))\n \n # All malloc-hugetlb2 tests will be run with GLIBC_TUNABLE=glibc.malloc.hugetlb=2\n define malloc-hugetlb2-ENVS\n-$(1)-malloc-hugetlb2-ENV += GLIBC_TUNABLES=glibc.malloc.hugetlb=2\n+$(1)-malloc-hugetlb2-TUNABLES += glibc.malloc.hugetlb=2\n endef\n $(foreach t,$(tests-malloc-hugetlb2),$(eval $(call malloc-hugetlb2-ENVS,$(t))))\n \n # All malloc-largetcache tests will be run with GLIBC_TUNABLE=glibc.malloc.tcache_max=1048576\n define malloc-largetcache-ENVS\n-$(1)-malloc-largetcache-ENV += GLIBC_TUNABLES=glibc.malloc.tcache_max=1048576\n+$(1)-malloc-largetcache-TUNABLES += glibc.malloc.tcache_max=1048576\n endef\n $(foreach t,$(tests-malloc-largetcache),$(eval $(call malloc-largetcache-ENVS,$(t))))\n \n@@ -373,12 +399,12 @@ endef\n $(foreach t,$(tests-mcheck),$(eval $(call mcheck-ENVS,$(t))))\n \n ifneq \"$(strip $(tests) $(tests-container) $(tests-internal) $(xtests) $(test-srcs))\" \"\"\n+\n # These are the implicit rules for making test outputs\n # from the test programs and whatever input files are present.\n-\n define make-test-out\n-$(if $($*-ENV-only),$(test-wrapper-env-only) $($*-ENV-only),\\\n- $(test-wrapper-env) $(run-program-env) $($*-ENV)) \\\n+$(if $($*-ENV-only),$(test-wrapper-env-only) $($*-ENV-only) $(test-tunables),\\\n+ $(test-wrapper-env) $(run-program-env) $($*-ENV) $(test-tunables)) \\\n $(host-test-program-cmd) $($*-ARGS)\n endef\n $(objpfx)%.out: %.input $(objpfx)%\n@@ -394,7 +420,7 @@ $(objpfx)%.out: /dev/null $(objpfx)%\t# Make it 2nd arg for canned sequence.\n # tests-container.\n $(tests-container:%=$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)%\n \t$(test-wrapper-env) $(run-program-env) $(test-via-rtld-prefix) \\\n-\t $(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) \\\n+\t $(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) $(test-tunables) \\\n \t $(host-test-program-cmd) $($*-ARGS) > $@; \\\n \t$(evaluate-test)\n \ndiff --git a/benchtests/Makefile b/benchtests/Makefile\nindex 156e308451..53f78232ff 100644\n--- a/benchtests/Makefile\n+++ b/benchtests/Makefile\n@@ -447,7 +447,7 @@ bench-deps := bench-skeleton.c bench-timing.h Makefile\n \n run-bench = $(test-wrapper-env) \\\n \t $(run-program-env) \\\n-\t $($*-ENV) $(test-via-rtld-prefix) $${run}\n+\t $($*-ENV) $(test-tunables) $(test-via-rtld-prefix) $${run}\n \n timing-type := $(objpfx)bench-timing-type\n extra-objs += bench-timing-type.o\ndiff --git a/malloc/Makefile b/malloc/Makefile\nindex fef5021298..f95bca7f8f 100644\n--- a/malloc/Makefile\n+++ b/malloc/Makefile\n@@ -438,17 +438,19 @@ malloc-check-env = \\\n MALLOC_CHECK_=3 \\\n LD_PRELOAD=$(objpfx)/libc_malloc_debug.so\n \n-malloc-check-tunables-env = \\\n- GLIBC_TUNABLES=glibc.malloc.check=3 \\\n- LD_PRELOAD=$(objpfx)/libc_malloc_debug.so\n-\n tst-malloc-check-ENV = $(malloc-check-env)\n tst-malloc-usable-ENV = $(malloc-check-env)\n tst-malloc-usable-threaded-main-ENV = $(malloc-check-env)\n tst-malloc-usable-threaded-worker-ENV = $(malloc-check-env)\n+\n+malloc-check-tunables-env = LD_PRELOAD=$(objpfx)/libc_malloc_debug.so\n+malloc-check-tunables-tun = glibc.malloc.check=3\n tst-malloc-usable-tunables-ENV = $(malloc-check-tunables-env)\n+tst-malloc-usable-tunables-TUNABLES += $(malloc-check-tunables-tun)\n tst-malloc-usable-tunables-threaded-main-ENV = $(malloc-check-tunables-env)\n+tst-malloc-usable-tunables-threaded-main-TUNABLES += $(malloc-check-tunables-tun)\n tst-malloc-usable-tunables-threaded-worker-ENV = $(malloc-check-tunables-env)\n+tst-malloc-usable-tunables-threaded-worker-TUNABLES += $(malloc-check-tunables-tun)\n \n CPPFLAGS-malloc-debug.c += -DUSE_TCACHE=0\n CPPFLAGS-malloc.c += -DUSE_TCACHE=1\n", "prefixes": [ "v3", "1/8" ] }