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 A13BF385800A for ; Tue, 14 Sep 2021 19:05:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A13BF385800A 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=nV1bB9PzVORgc/arNOfwiL3eU0 ZP5O5NS2hZeKaVggtlnfgEZs4ctAC4anSD4rBzUT8AZ3+n5byq7fHrIqA6dyND7tUiLyHZsUfiGPw /KzmDHvUHUxKnxCC14TdB/rbj/nh5INOLwfvRa/NPjBq4NCWI5TAnJ5Crgh81BIz+D0AocsOehywV HMlYksL3RmIAfdwPxJaG/w+Nrg9EkrNT1czS5NWTG9emHIAFA8vMG4sy1GEDgnchULC7sY61veDp9 3s2tgwi8tJtmUrf4HiR1FDN1jxNw9X/XyPanulSoC99RCRSMie+iKnMySIse4IM0a5DM69fsXn86f or3x/4Bw==; 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 1mQDjw-0007XG-Nw; Tue, 14 Sep 2021 21:05:08 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.94.2) (envelope-from ) id 1mQDjw-00Bszy-57; Tue, 14 Sep 2021 21:05:08 +0200 From: Aurelien Jarno To: libc-stable@sourceware.org Cc: Aurelien Jarno Subject: [COMMITTED 2.33] Fix failing nss/tst-nss-files-hosts-long with local resolver Date: Tue, 14 Sep 2021 21:04:57 +0200 Message-Id: <20210914190457.2832887-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:10 -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