From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id 2A48A1F463 for ; Fri, 6 Dec 2019 04:21:04 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=fOf2351DoJlYzwYX3T4G9FgbSDuJhHFKfgA7F1bkf2mZziHtr09qP DVHa4qCS3Rc7wBSiwQAaYk3XfUPSykI/6608of6V9q9N/Ee80fPdh/9AMDZ/lyBB j950MeJpcL5Gma062Qj9e9jBCODofEqhw5gPtuTj/xtG6+23CVvQws= 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:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=qveoQ3/vCQnuqQSvUpiZDcUa08s=; b=mXQjJ7G5quSiqJHCFApDkqyhGwCG CEYeASN2tLcwvYiXze+5k8mv9SqmsdMG3+tiwABbbjp0GaWpwEeoQD/VMAfu/EHW Frs1bNe9t4uGmwJcGjouRRvWplsLgvWPG335NbCwCuuyjAADstKCCYj0ZZBMxUp6 gdjmni4fxku9Sac= Received: (qmail 106769 invoked by alias); 6 Dec 2019 04:21:01 -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 Received: (qmail 106740 invoked by uid 89); 6 Dec 2019 04:21:01 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575605968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=6xBVi9jgrTuh/pN3MSlSBSeKAKdmU9rbTGXzeutzFhc=; b=VhzFpIILgaQvy9+uhqbJQO4XoKd/gjolIdx1HaHub9ubTiuKtObXlpi6ZAioGDSyZokrAK 8Pcb0KcFcmg7uZts+cWvO6ygW7yc8D8JDwRgHNzvssQP5PgXTfKFEVGBT/P+o1CxQYKfSG t3fDk1tMACa8WqNOV44YVVGL/llF1tE= From: DJ Delorie To: Florian Weimer Cc: libc-alpha@sourceware.org Subject: Re: RFC: test-in-container vs ld.so In-Reply-To: <87wocavneb.fsf@mid.deneb.enyo.de> (message from Florian Weimer on Fri, 08 Nov 2019 08:27:08 +0100) Date: Thu, 05 Dec 2019 23:19:22 -0500 Message-ID: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Florian Weimer writes: > I suspect the removalof LC_*, LANG etc. variables should be done in > test-container, just for convenience. This is what I ended up with. All tests pass, but as I mentioned in a previous email, very few tests run in the container. This blocks the outer variables from coming in, while letting the test itself set them again if needed. I'm not sure what kind of test we could run in the container to make sure we're *not* accidentally using the build-tree file, though. diff --git a/Rules b/Rules index 8dbac56ce6..9ca5e14092 100644 --- a/Rules +++ b/Rules @@ -275,8 +275,8 @@ $(objpfx)%.out: /dev/null $(objpfx)%=09# Make it 2nd ar= g for canned sequence. # tests-container. $(tests-container:%=3D$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(= objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)% =09$(test-wrapper-env) $(run-program-env) $(run-via-rtld-prefix) \ -=09 $(common-objpfx)support/test-container env $(run-program-env) $($*-EN= V) \ -=09 $(host-test-program-cmd) $($*-ARGS) > $@; \ +=09 $(common-objpfx)support/test-container env $($*-ENV) \ +=09 $(built-program-file) $($*-ARGS) > $@; \ =09$(evaluate-test) =20 =20 diff --git a/support/test-container.c b/support/test-container.c index 5d08979df3..9b0b1c7631 100644 --- a/support/test-container.c +++ b/support/test-container.c @@ -712,6 +712,12 @@ main (int argc, char **argv) --argc; } =20 + /* We don't want to inherit these from the ld.so wrapper we were + invoked with, but the test can still provide a test-specific + value via the "env" we pretend to run. */ + unsetenv ("GCONV_PATH"); + unsetenv ("LOCPATH"); + if (strcmp (argv[1], "env") =3D=3D 0) { ++argv;