Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196903/?format=api
{ "id": 2196903, "url": "http://patchwork.ozlabs.org/api/patches/2196903/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/31732a6b137f5004d864da924d662b2098f10fc3.1771249712.git.fweimer@redhat.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": "<31732a6b137f5004d864da924d662b2098f10fc3.1771249712.git.fweimer@redhat.com>", "list_archive_url": null, "date": "2026-02-16T13:49:10", "name": "[1/2] support: no_override_resolv_conf_search flag for resolver test framework", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "233c24edb09434afda62bcea93871c40ea014d9a", "submitter": { "id": 14312, "url": "http://patchwork.ozlabs.org/api/people/14312/?format=api", "name": "Florian Weimer", "email": "fweimer@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/31732a6b137f5004d864da924d662b2098f10fc3.1771249712.git.fweimer@redhat.com/mbox/", "series": [ { "id": 492311, "url": "http://patchwork.ozlabs.org/api/series/492311/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=492311", "date": "2026-02-16T13:49:10", "name": "[1/2] support: no_override_resolv_conf_search flag for resolver test framework", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492311/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196903/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196903/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=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=HRhjaL3g;\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=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=HRhjaL3g", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124" ], "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 4fF3zq5sR5z1xtN\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 00:49:43 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id A0EDF4B9DB6F\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 13:49:41 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id B0E664BA2E19\n for <libc-alpha@sourceware.org>; Mon, 16 Feb 2026 13:49:17 +0000 (GMT)", "from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-93-JGrCxQ1SMm69RXnrYf4Epw-1; Mon,\n 16 Feb 2026 08:49:15 -0500", "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id E54151800378; Mon, 16 Feb 2026 13:49:14 +0000 (UTC)", "from fweimer-oldenburg.csb.redhat.com (unknown [10.45.224.124])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 853641955F43; Mon, 16 Feb 2026 13:49:13 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org A0EDF4B9DB6F", "OpenDKIM Filter v2.11.0 sourceware.org B0E664BA2E19" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org B0E664BA2E19", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org B0E664BA2E19", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771249757; cv=none;\n b=L2dMrK9d6ZOyNOs2iAOr++uOADchhjf6p6RO5YT7h7B3J5EZa4K1k/TE0ktiyFYxmsjwGtH9p6Yjm5TpWOTWYn2CMpLDzdC2jGjjyrJtTa9aWfB6aqF3k1i7qEMuL1WTXHTBezNKR1dY+DF1BNiZ0X08xnRyl0sK0JKS5uitEJ8=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771249757; c=relaxed/simple;\n bh=I7nhleFNs576f+Iovqr/UV+I776ABvgdQDXaeKelyhk=;\n h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version;\n b=M1KOJBMzgy53eP7UgWG7h8ztwvtZxEhIRfSc3cLdoVxCG8XutXSWhKp4DJZEwp3iV7AsKRzGRmmzutGIY0JTa4JJuZhEJj/Q+3pVOetulCWmGX2Fi3itpUFjyVkvmWTeILSMyWeblEC2mMvsmzWGw6yIleRUIK1O+/EpnJiNxx8=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771249757;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type;\n bh=tnseaammGfXOtl5lz7O9zOTUv0JFZPh/v6h0uzRqMVM=;\n b=HRhjaL3gIct0esV9AspVQ4SB6VbW/CfS6VSQiAg5cvMUNcIwsb3uMi0FtdcLfLbheaARwA\n /7fmqF2F4JzO3/aJBEqabY08Y6dhiUi6XHSDkHVlwdMxXR11EXAa8vD8s4cnqycPZt6yh2\n shGM+ukHh4/oIfkKAC0MqGgHZ/0tTks=", "X-MC-Unique": "JGrCxQ1SMm69RXnrYf4Epw-1", "X-Mimecast-MFC-AGG-ID": "JGrCxQ1SMm69RXnrYf4Epw_1771249755", "From": "Florian Weimer <fweimer@redhat.com>", "To": "libc-alpha@sourceware.org", "Cc": "Carlos =?utf-8?b?UGXDs24=?= Costa <carlospeon@gmail.com>", "Subject": "[PATCH 1/2] support: no_override_resolv_conf_search flag for\n resolver test framework", "Message-ID": "\n <31732a6b137f5004d864da924d662b2098f10fc3.1771249712.git.fweimer@redhat.com>", "X-From-Line": "31732a6b137f5004d864da924d662b2098f10fc3 Mon Sep 17 00:00:00 2001", "Date": "Mon, 16 Feb 2026 14:49:10 +0100", "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": "zerhF7CeUhFv0DD1SHs8JtC4QuyQLJ5p1eJOpDvNyX4_1771249755", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain", "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": "It is required to test \"search .\" in /etc/resolv.conf files. The\ndefault is to override the search path isolate from unexpected\nsettings in the test execution environment.\n---\n resolv/Makefile | 2 +\n resolv/tst-resolv-no-search.c | 174 ++++++++++++++++++\n .../tst-resolv-no-search.root/etc/resolv.conf | 1 +\n support/resolv_test.c | 3 +\n support/resolv_test.h | 3 +\n 5 files changed, 183 insertions(+)\n create mode 100644 resolv/tst-resolv-no-search.c\n create mode 100644 resolv/tst-resolv-no-search.root/etc/resolv.conf\n\n\nbase-commit: 5b713b49443eb6a4e54e50e2f0147105f86dab02", "diff": "diff --git a/resolv/Makefile b/resolv/Makefile\nindex b74c8f325e..f817d040c5 100644\n--- a/resolv/Makefile\n+++ b/resolv/Makefile\n@@ -83,6 +83,7 @@ tests = tst-aton tst-leaks tst-inet_ntop\n tests-container += \\\n tst-getaddrinfo-eai-again \\\n tst-leaks2 \\\n+ tst-resolv-no-search \\\n # tests-container\n \n tests-internal += tst-inet_aton_exact\n@@ -310,6 +311,7 @@ $(objpfx)tst-resolv-res_init-thread: $(objpfx)libresolv.so \\\n $(shared-thread-library)\n $(objpfx)tst-resolv-invalid-cname: $(objpfx)libresolv.so \\\n $(shared-thread-library)\n+$(objpfx)tst-resolv-no-search: $(objpfx)libresolv.so $(shared-thread-library)\n $(objpfx)tst-resolv-noaaaa: $(objpfx)libresolv.so $(shared-thread-library)\n $(objpfx)tst-resolv-noaaaa-vc: $(objpfx)libresolv.so $(shared-thread-library)\n $(objpfx)tst-resolv-nondecimal: $(objpfx)libresolv.so $(shared-thread-library)\ndiff --git a/resolv/tst-resolv-no-search.c b/resolv/tst-resolv-no-search.c\nnew file mode 100644\nindex 0000000000..29701d4772\n--- /dev/null\n+++ b/resolv/tst-resolv-no-search.c\n@@ -0,0 +1,174 @@\n+/* Test using \"search .\" in /etc/resolv.conf.\n+ Copyright (C) 2026 Free Software Foundation, Inc.\n+ This file is part of the GNU C Library.\n+\n+ The GNU C Library is free software; you can redistribute it and/or\n+ modify it under the terms of the GNU Lesser General Public\n+ License as published by the Free Software Foundation; either\n+ version 2.1 of the License, or (at your option) any later version.\n+\n+ The GNU C Library is distributed in the hope that it will be useful,\n+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ Lesser General Public License for more details.\n+\n+ You should have received a copy of the GNU Lesser General Public\n+ License along with the GNU C Library; if not, see\n+ <https://www.gnu.org/licenses/>. */\n+\n+#include <netdb.h>\n+#include <resolv.h>\n+\n+#include <stdlib.h>\n+#include <string.h>\n+#include <support/check.h>\n+#include <support/check_nss.h>\n+#include <support/namespace.h>\n+#include <support/resolv_test.h>\n+#include <support/support.h>\n+\n+/* Check that plain res_init loads the configuration as expected. */\n+static void\n+test_res_init (void *ignored)\n+{\n+ res_init ();\n+ TEST_COMPARE_STRING (_res.dnsrch[0], \".\");\n+ TEST_COMPARE_STRING (_res.dnsrch[1], NULL);\n+}\n+\n+static void\n+response (const struct resolv_response_context *ctx,\n+ struct resolv_response_builder *b,\n+ const char *qname, uint16_t qclass, uint16_t qtype)\n+{\n+ TEST_VERIFY_EXIT (qclass == C_IN);\n+ TEST_COMPARE (ctx->server_index, 0);\n+\n+ if (strncmp (qname, \"does-not-exist\", strlen (\"does-not-exist\")) == 0)\n+ {\n+ resolv_response_init (b, (struct resolv_response_flags)\n+ { .rcode = ns_r_nxdomain });\n+ resolv_response_add_question (b, qname, qclass, qtype);\n+ return;\n+ }\n+\n+ resolv_response_init (b, (struct resolv_response_flags) { });\n+ resolv_response_add_question (b, qname, qclass, qtype);\n+ resolv_response_section (b, ns_s_an);\n+\n+ resolv_response_open_record (b, qname, qclass, qtype, 0);\n+ switch (qtype)\n+ {\n+ case T_A:\n+ {\n+ char ipv4[4] = {192, 0, 2, 17};\n+ resolv_response_add_data (b, &ipv4, sizeof (ipv4));\n+ }\n+ break;\n+ case T_AAAA:\n+ {\n+ char ipv6[16]\n+ = {0x20, 0x01, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};\n+ resolv_response_add_data (b, &ipv6, sizeof (ipv6));\n+ }\n+ break;\n+ }\n+ resolv_response_close_record (b);\n+}\n+\n+static void\n+check_h (const char *name, int family, const char *expected)\n+{\n+ if (family == AF_INET)\n+ {\n+ char *query = xasprintf (\"gethostbyname (\\\"%s\\\")\", name);\n+ check_hostent (query, gethostbyname (name), expected);\n+ free (query);\n+ }\n+ {\n+ char *query = xasprintf (\"gethostbyname2 (\\\"%s\\\", %d)\", name, family);\n+ check_hostent (query, gethostbyname2 (name, family), expected);\n+ free (query);\n+ }\n+}\n+\n+static void\n+check_ai (const char *name, int family, const char *expected)\n+{\n+ struct addrinfo hints = { .ai_family = family, .ai_socktype = SOCK_STREAM, };\n+ struct addrinfo *ai;\n+ char *query = xasprintf (\"%s:80 [%d]\", name, hints.ai_family);\n+ int ret = getaddrinfo (name, \"80\", &hints, &ai);\n+ check_addrinfo (query, ai, ret, expected);\n+ if (ret == 0)\n+ freeaddrinfo (ai);\n+ free (query);\n+}\n+\n+static int\n+do_test (void)\n+{\n+ support_isolate_in_subprocess (test_res_init, NULL);\n+\n+ struct resolv_test *aux = resolv_test_start\n+ ((struct resolv_redirect_config)\n+ {\n+ .response_callback = response,\n+ .no_override_resolv_conf_search = true,\n+ });\n+\n+ check_h (\"www.example\", AF_INET,\n+ \"name: www.example\\n\"\n+ \"address: 192.0.2.17\\n\");\n+ check_h (\"www.example\", AF_INET6,\n+ \"name: www.example\\n\"\n+ \"address: 2001:db8::1\\n\");\n+ check_ai (\"www.example\", AF_UNSPEC,\n+ \"address: STREAM/TCP 192.0.2.17 80\\n\"\n+ \"address: STREAM/TCP 2001:db8::1 80\\n\");\n+ check_ai (\"www.example\", AF_INET,\n+ \"address: STREAM/TCP 192.0.2.17 80\\n\");\n+ check_ai (\"www.example\", AF_INET6,\n+ \"address: STREAM/TCP 2001:db8::1 80\\n\");\n+ check_h (\"does-not-exist.example\", AF_INET,\n+ \"error: HOST_NOT_FOUND\\n\");\n+ check_h (\"does-not-exist.example\", AF_INET6,\n+ \"error: HOST_NOT_FOUND\\n\");\n+ check_ai (\"does-not-exist.example\", AF_UNSPEC,\n+ \"error: Name or service not known\\n\");\n+ check_ai (\"does-not-exist.example\", AF_INET,\n+ \"error: Name or service not known\\n\");\n+ check_ai (\"does-not-exist.example\", AF_INET6,\n+ \"error: Name or service not known\\n\");\n+\n+ /* With trailing dot. */\n+ check_h (\"www.example.\", AF_INET,\n+ \"name: www.example\\n\"\n+ \"address: 192.0.2.17\\n\");\n+ check_h (\"www.example.\", AF_INET6,\n+ \"name: www.example\\n\"\n+ \"address: 2001:db8::1\\n\");\n+ check_ai (\"www.example.\", AF_UNSPEC,\n+ \"address: STREAM/TCP 192.0.2.17 80\\n\"\n+ \"address: STREAM/TCP 2001:db8::1 80\\n\");\n+ check_ai (\"www.example.\", AF_INET,\n+ \"address: STREAM/TCP 192.0.2.17 80\\n\");\n+ check_ai (\"www.example.\", AF_INET6,\n+ \"address: STREAM/TCP 2001:db8::1 80\\n\");\n+ check_h (\"does-not-exist.example.\", AF_INET,\n+ \"error: HOST_NOT_FOUND\\n\");\n+ check_h (\"does-not-exist.example.\", AF_INET6,\n+ \"error: HOST_NOT_FOUND\\n\");\n+ check_ai (\"does-not-exist.example.\", AF_UNSPEC,\n+ \"error: Name or service not known\\n\");\n+ check_ai (\"does-not-exist.example.\", AF_INET,\n+ \"error: Name or service not known\\n\");\n+ check_ai (\"does-not-exist.example.\", AF_INET6,\n+ \"error: Name or service not known\\n\");\n+\n+ resolv_test_end (aux);\n+\n+ return 0;\n+}\n+\n+#include <support/test-driver.c>\ndiff --git a/resolv/tst-resolv-no-search.root/etc/resolv.conf b/resolv/tst-resolv-no-search.root/etc/resolv.conf\nnew file mode 100644\nindex 0000000000..5ace648869\n--- /dev/null\n+++ b/resolv/tst-resolv-no-search.root/etc/resolv.conf\n@@ -0,0 +1 @@\n+search .\ndiff --git a/support/resolv_test.c b/support/resolv_test.c\nindex e1ff3bd8c6..dad755ac30 100644\n--- a/support/resolv_test.c\n+++ b/support/resolv_test.c\n@@ -1098,6 +1098,9 @@ resolv_test_init (void)\n static void\n set_search_path (struct resolv_redirect_config config)\n {\n+ if (config.no_override_resolv_conf_search)\n+ return;\n+\n memset (_res.defdname, 0, sizeof (_res.defdname));\n memset (_res.dnsrch, 0, sizeof (_res.dnsrch));\n \ndiff --git a/support/resolv_test.h b/support/resolv_test.h\nindex f0b947ee2e..7a81c1c513 100644\n--- a/support/resolv_test.h\n+++ b/support/resolv_test.h\n@@ -96,6 +96,9 @@ struct resolv_redirect_config\n domain name as well. */\n const char *search[7];\n \n+ /* If true, do not override the search path loaded from /etc/resolv.conf. */\n+ bool no_override_resolv_conf_search;\n+\n /* Number of servers to activate in resolv. 0 means the default,\n resolv_max_test_servers. */\n int nscount;\n", "prefixes": [ "1/2" ] }