From: Florian Weimer <fweimer@redhat.com>
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 [thread overview]
Message-ID: <871s0thvmn.fsf@oldenburg2.str.redhat.com> (raw)
These environment variables are incorrect inside the container.
2019-05-20 Florian Weimer <fweimer@redhat.com>
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)
next reply other threads:[~2019-05-20 17:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 17:40 Florian Weimer [this message]
2019-05-20 18:19 ` [PATCH] test-in-container: Do not set GCONV_PATH, LOCPATH DJ Delorie
2019-05-20 18:23 ` Florian Weimer
2019-05-20 19:26 ` DJ Delorie
2019-05-20 19:38 ` Florian Weimer
2019-05-21 12:49 ` DJ Delorie
2019-05-21 13:06 ` Florian Weimer
2019-05-21 13:24 ` DJ Delorie
2019-05-21 14:04 ` Zack Weinberg
2019-05-23 13:59 ` Florian Weimer
2019-05-23 14:22 ` Carlos O'Donell
2019-05-23 19:48 ` DJ Delorie
2019-05-24 4:05 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871s0thvmn.fsf@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--cc=dj@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).