From patchwork Mon May 20 17:40:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1102268 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-102118-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="FGfR75ng"; 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 4575lv3YZYz9s1c for ; Tue, 21 May 2019 03:40:59 +1000 (AEST) 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:date:message-id :mime-version:content-type; q=dns; s=default; b=W2R0vxZFV4/TaTGq 6o07nR4lAe8uk0yBwXsaXJXwQIt3Gg4izYghWMiSiUqINSHEc8HcStwF4UbYbztz 2SFVZ6wnsjttCGnzsoA6xIqXD1QmU/OC/qEiCVk8pmDhO8P8UhFhuDUmrdKQZO8H e/0w1fZYurj6hgRCBBfHRmVyT6o= 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:date:message-id :mime-version:content-type; s=default; bh=9tm4CzgQKr5b2PLmXo0qpC 5AoUY=; b=FGfR75ngRLgkAJklYPViZXbzqtMlvEH5c+W1goGJ7eEoWyKzXb0eJc ZijzJ8CrVKnco2EXHIhtJZrmQxUvc9IAU2ufsGLYYpvSu6sh66cIJplnlZ+6edaS DcVtGb6Fckv+Q40wTDH8i/HBewL5FlHgJGrYIrZKmjUDoM42HaXzs= Received: (qmail 99402 invoked by alias); 20 May 2019 17:40:53 -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 99393 invoked by uid 89); 20 May 2019 17:40:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=Outer X-HELO: mx1.redhat.com From: Florian Weimer To: libc-alpha@sourceware.org Cc: dj@redhat.com Subject: [PATCH] test-in-container: Do not set GCONV_PATH, LOCPATH Date: Mon, 20 May 2019 19:40:48 +0200 Message-ID: <871s0thvmn.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 These environment variables are incorrect inside the container. 2019-05-20 Florian Weimer test-in-container: Do not set GCONV_PATH, LOCPATH. * Makeconfig (run-program-env-container): New variable. (run-program-env): Use it. * Rules ($(tests-container:%=$(objpfx)%.out)): Update comment. Use $(run-program-env-container) instead of $(run-program-env). diff --git a/Makeconfig b/Makeconfig index 0e386fbc19..2fbd3c0192 100644 --- a/Makeconfig +++ b/Makeconfig @@ -743,10 +743,13 @@ run-via-rtld-prefix = \ else run-via-rtld-prefix = endif +# Test-in-containers need fewer environment variables. +run-program-env-container = LC_ALL=C # $(run-program-env) is the default environment variable settings to # use when running a program built with the newly built library. run-program-env = GCONV_PATH=$(common-objpfx)iconvdata \ - LOCPATH=$(common-objpfx)localedata LC_ALL=C + LOCPATH=$(common-objpfx)localedata \ + $(run-program-env-container) # $(run-program-prefix) is a command that, when prepended to the name # of a program built with the newly built library, produces a command # that, executed on the build system on which "make" is run, runs that diff --git a/Rules b/Rules index 222dba6dcb..2c8f1eecb0 100644 --- a/Rules +++ b/Rules @@ -273,10 +273,15 @@ $(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence. # Any tests that require an isolated container (filesystem, network # and pid namespaces) in which to run, should be added to # tests-container. +# +# Note: Outer use of $(run-program-env-container) instead of +# $(run-program-env) assumes that support/test-container does not use +# locales or gconv modules. $(tests-container:%=$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)% - $(test-wrapper-env) $(run-program-env) $(run-via-rtld-prefix) \ - $(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) \ - $(host-test-program-cmd) $($*-ARGS) > $@; \ + $(test-wrapper-env) $(run-program-env-container) \ + $(run-via-rtld-prefix) \ + $(common-objpfx)support/test-container env $($*-ENV) \ + $(host-test-program-cmd) $($*-ARGS) > $@; \ $(evaluate-test)