From patchwork Tue Feb 27 20:34:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 878828 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-90670-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="QyULI9fA"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zrVm74gdGz9s1d for ; Wed, 28 Feb 2018 07:34:15 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:subject; q=dns; s= default; b=bORl0SfUAGlXi+E/61hxiYvfKiOCLUWR05wp/CA8q/NWXqeCvtFCb 8LTF4GUNVP8U/xyxRyFsi2OXqX9Jc+M5LOYP4cDkkfYg8oo3hE5Ck8+EAaguknEG hR/oeD2SYYHmQZag2chgN5bD2dJoI33U975ApQFlFTFxl2Fb2iril4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:subject; s=default; bh=fa3/ySZV753ksACwQ7Agjuukjj0=; b=QyULI9fAGyS/a4VUjRxNTG4/GijJ EigfjT3CKGscQJr7buHNAoEaKldKX8jEipZwdFP4XoaiDOQFGqYmzEg0LqLeFLM6 tPfA8+L4vgbm62vn17EGMymDVtkjOQ90NBVgyRamNQpmlHLZeL4YVkOk//qftV7Z 5BkwqPQtvcsCjtA= Received: (qmail 15008 invoked by alias); 27 Feb 2018 20:34:05 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 14876 invoked by uid 89); 27 Feb 2018 20:34:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=our X-HELO: mx1.redhat.com Date: Tue, 27 Feb 2018 15:34:00 -0500 Message-Id: From: DJ Delorie To: libc-alpha@sourceware.org Subject: RFC V2 [2/2] test-in-container * nss/tst-nss-test3.c: Convert to test-in-container. * nss/tst-nss-test3.root/: New. diff --git a/nss/Makefile b/nss/Makefile index a5cd2aacae..60a28a1519 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -55,11 +55,13 @@ tests-internal = tst-field tests = test-netdb test-digits-dots tst-nss-getpwent bug17079 \ tst-nss-test1 \ tst-nss-test2 \ - tst-nss-test3 \ tst-nss-test4 \ tst-nss-test5 xtests = bug-erange +tests-container = \ + tst-nss-test3 + # Tests which need libdl ifeq (yes,$(build-shared)) tests += tst-nss-files-hosts-erange diff --git a/nss/tst-nss-test3.c b/nss/tst-nss-test3.c index d9d708ae7b..4112231778 100644 --- a/nss/tst-nss-test3.c +++ b/nss/tst-nss-test3.c @@ -107,7 +107,11 @@ do_test (void) int i; struct group *g = NULL; - __nss_configure_lookup ("group", "test1"); +/* Previously we used __nss_configure_lookup to isolate the test + from the host environment and to get it to lookup from our new + test1 NSS service module, but now this test is run in a different + root filesystem via the test-container support and we directly + configure the use of the test1 NSS service. */ setgrent (); diff --git a/nss/tst-nss-test3.root/etc/nsswitch.conf b/nss/tst-nss-test3.root/etc/nsswitch.conf new file mode 100644 index 0000000000..5e08fe5eea --- /dev/null +++ b/nss/tst-nss-test3.root/etc/nsswitch.conf @@ -0,0 +1 @@ +group test1 diff --git a/nss/tst-nss-test3.root/files.txt b/nss/tst-nss-test3.root/files.txt new file mode 100644 index 0000000000..a10beb1e6c --- /dev/null +++ b/nss/tst-nss-test3.root/files.txt @@ -0,0 +1,2 @@ +cp $B/nss/libnss_test1.so $L/libnss_test1.so.2 +cp $B/nss/libnss_test2.so $L/libnss_test2.so.2