get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2225748/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2225748,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2225748/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260421143804.3933020-2-yury.khrustalev@arm.com/",
    "project": {
        "id": 41,
        "url": "http://patchwork.ozlabs.org/api/1.1/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": ""
    },
    "msgid": "<20260421143804.3933020-2-yury.khrustalev@arm.com>",
    "date": "2026-04-21T14:37:57",
    "name": "[v4,1/8] tests: Allow tests to append tunables",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8dfb06394bc455e98bf5f65fe5b1556ec65edda5",
    "submitter": {
        "id": 88214,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/88214/?format=api",
        "name": "Yury Khrustalev",
        "email": "yury.khrustalev@arm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20260421143804.3933020-2-yury.khrustalev@arm.com/mbox/",
    "series": [
        {
            "id": 500822,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500822/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=500822",
            "date": "2026-04-21T14:38:03",
            "name": "tests: Allow tests to append tunables",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/500822/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225748/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225748/checks/",
    "tags": {},
    "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=vAaBpbI1;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.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=vAaBpbI1",
            "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 [38.145.34.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 4g0Q2t62Msz1yJG\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 00:38:40 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 281F24B9DB4B\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 14:38:35 +0000 (GMT)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by sourceware.org (Postfix) with ESMTP id 69C304BA23CC\n for <libc-alpha@sourceware.org>; Tue, 21 Apr 2026 14:38:14 +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 623DD263D;\n Tue, 21 Apr 2026 07:38:08 -0700 (PDT)",
            "from fdebian.localdomain (G7GWP2TF97.cambridge.arm.com [10.1.25.51])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n 3CC7F3FAF5; Tue, 21 Apr 2026 07:38:13 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 281F24B9DB4B",
            "OpenDKIM Filter v2.11.0 sourceware.org 69C304BA23CC"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 69C304BA23CC",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 69C304BA23CC",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776782294; cv=none;\n b=SNhUcEtJLmWAKp+aFIwcMxDLAIHc+0To5cay5Kns/xUVK/6e9bFQ5DNnOlrJxUKTB8FZhy8fITVpm6AzAnpLXUJIjVtTIIdCqB812TX9Zrl3gvOB1ocuRYk6BLFRnW0rbE97kXh2L5IKRT/BUmB0Q8g3ox4aXVuUea3nWHdu1n8=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776782294; c=relaxed/simple;\n bh=JlE5LxSdpu37ImEHTJFf7JqnZWP9UwZlq8zfUBg09Vs=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=o12FxOJWUVTKaAFP8Khr4udLOmYhrwQQLhCNGnMSnW8K0Sm4DrXJLBmEhtMKMFh+6sxqGjl5AYusOns2xprbGm9D/cXSCOVFTDttNEi0Dl8YU5ZQCfWensdYUJlp/Gb3denSvB4lLFgdembKuHW177cqXmJY+A6Jo+mIMAB4CxM=",
        "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=1776782293; bh=JlE5LxSdpu37ImEHTJFf7JqnZWP9UwZlq8zfUBg09Vs=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=vAaBpbI1YgeGIftwmsu9i3bv/BVqAk06TRbLmetNK/Ii5nvgPkEVRv1qlfNMwQYTF\n KK5HgtoAZ6F8F9b4Uo2+yFObbzNGbgBJiw/CA9ze/h7ub1Mg51j9oT8V1Br5Z8wglO\n ffM0vT5WBhft3JXaFiErroATHRibhg5ToIoj7dYE=",
        "From": "Yury Khrustalev <yury.khrustalev@arm.com>",
        "To": "libc-alpha@sourceware.org",
        "Cc": "Adhemerval Zanella <adhemerval.zanella@linaro.org>,\n Andreas Schwab <schwab@suse.de>, Wilco Dijkstra <wilco.dijkstra@arm.com>",
        "Subject": "[PATCH v4 1/8] tests: Allow tests to append tunables",
        "Date": "Tue, 21 Apr 2026 15:37:57 +0100",
        "Message-ID": "<20260421143804.3933020-2-yury.khrustalev@arm.com>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260421143804.3933020-1-yury.khrustalev@arm.com>",
        "References": "<20260421143804.3933020-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               | 32 +++++++++++++++++++++++++-------\n benchtests/Makefile |  2 +-\n malloc/Makefile     | 10 ++++++----\n 3 files changed, 32 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/Rules b/Rules\nindex 9d8587a148..64a337b265 100644\n--- a/Rules\n+++ b/Rules\n@@ -348,21 +348,39 @@ $(1)-malloc-check-ENV = MALLOC_CHECK_=3 \\\n endef\n $(foreach t,$(tests-malloc-check),$(eval $(call malloc-check-ENVS,$(t))))\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+$(subst $(empty) ,:,$(strip $($*-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=$(subst $(empty) ,:,$(strip $($*-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 +391,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 +412,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": [
        "v4",
        "1/8"
    ]
}