From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by sourceware.org (Postfix) with ESMTPS id 651153857C66 for ; Tue, 14 Sep 2021 19:05:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 651153857C66 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=aurel32.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=aurel32.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date: Subject:Cc:To:From:Content-Type:From:Reply-To:Subject:Content-ID: Content-Description:In-Reply-To:References:X-Debbugs-Cc; bh=UwCiWbCEaMhI/Ou79BC/+YxwPN0CtQqVnoDg/2v2MGg=; b=GoMhX6zzOavCWDHFr0xjyiZO6K OoYP5G1Mgh+G9USBLJZA6TKHhN+4Hzy/lgUPQiz2FGbvI3rO7Ko97fu6ahb8SCSu4ZszhhlJe8G6p +qP9rZ0joVDVIlS9CVTQkaJR8X98yd/VCuMI/8pbAZhcSECcLNBlwq6eF2dnsM2MUj3MineVmRMFY f9rezh6mX+eu7FJ62V1FgKU9P+AXqdXJd2kZljOfy5JlyVswo0GqWSqtgXp1nLVZ3RD2Fj33wvO2L ksfU7OKjgFIRhzL/ESo15OQ9AMBvDaWWoUHv9hLb+rloe+XoyPxgcYC7aku0HrrmHP6AaMofCBOoS VYE1MC+A==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQDkd-0007dQ-G2; Tue, 14 Sep 2021 21:05:51 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.94.2) (envelope-from ) id 1mQDkc-00Bt4P-Tb; Tue, 14 Sep 2021 21:05:50 +0200 From: Aurelien Jarno To: libc-stable@sourceware.org Cc: Aurelien Jarno Subject: [COMMITTED 2.32] Fix failing nss/tst-nss-files-hosts-long with local resolver Date: Tue, 14 Sep 2021 21:05:28 +0200 Message-Id: <20210914190528.2833162-1-aurelien@aurel32.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2021 19:05:53 -0000 When a local resolver like unbound is listening on the IPv4 loopback address 127.0.0.1, the nss/tst-nss-files-hosts-long test fails. This is due to: - the default resolver in the absence of resolv.conf being 127.0.0.1 - the default DNS NSS database configuration in the absence of nsswitch.conf being 'hosts: dns [!UNAVAIL=return] file' This causes the requests for 'test4' and 'test6' to first be sent to the local resolver, which responds with NXDOMAIN in the likely case those records do no exist. In turn that causes the access to /etc/hosts to be skipped, which is the purpose of that test. Fix that by providing a simple nsswitch.conf file forcing access to /etc/hosts for that test. I have tested that the only changed result in the testsuite is that test. (cherry picked from commit 2738480a4b0866723fb8c633f36bdd34a8767581) --- nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf | 1 + 1 file changed, 1 insertion(+) create mode 100644 nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf diff --git a/nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf b/nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf new file mode 100644 index 0000000000..5b0c6a4199 --- /dev/null +++ b/nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf @@ -0,0 +1 @@ +hosts: files -- 2.30.2