Message ID | 20200923160655.GA16688@aloka.lostca.se |
---|---|
State | Superseded |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B0483937421; Wed, 23 Sep 2020 16:07:00 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from aloka.lostca.se (aloka.lostca.se [178.63.46.202]) by sourceware.org (Postfix) with ESMTPS id BD9993857C46 for <libc-alpha@sourceware.org>; Wed, 23 Sep 2020 16:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BD9993857C46 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lostca.se Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arjun.is@lostca.se Received: from aloka.lostca.se (aloka [127.0.0.1]) by aloka.lostca.se (Postfix) with ESMTP id 455DE1B9D8; Wed, 23 Sep 2020 16:06:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lostca.se; h=date:from:to :cc:subject:message-id:mime-version:content-type; s=howrah; bh=z jzS992V2bDAfaCHn33kq7rW0Lo=; b=snoN6DhGQntCxPfgJy2py/sYOFeOE3gii nJWqe4ge6JtVR/V/zMSxxaKtUUkONU6dgz1EPeMDMvYB9WF8Ks6xmpjnOqlBzjMP WsFiDpZNVMYXBS/DBmeuriYtMWRed1FbhuJX3zGDWft1Xl99JGYQM42hMaRdCpHk 3fh8qC2css= Received: from localhost (unknown [IPv6:2a01:4f8:120:624c::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aloka.lostca.se (Postfix) with ESMTPSA id 0947C1B9D7; Wed, 23 Sep 2020 16:06:57 +0000 (UTC) Date: Wed, 23 Sep 2020 16:06:56 +0000 From: Arjun Shankar <arjun.is@lostca.se> To: libc-alpha@sourceware.org Subject: [PATCH] Set locale related environment variables in debugglibc.sh Message-ID: <20200923160655.GA16688@aloka.lostca.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Cc: "Gabriel F. T. Gomes" <gabriel@inconstante.net.br> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
Set locale related environment variables in debugglibc.sh
|
|
Commit Message
Arjun Shankar
Sept. 23, 2020, 4:06 p.m. UTC
From: Arjun Shankar <arjun@redhat.com>
Tests and binaries that use locale related functions need to run in the
correct locale environment when being debugged via debugglibc.sh. This
commit sets up the environment, specifically: GCONV_PATH, LOCPATH, and
LC_ALL for such tests and binaries when they are being debugged outside
of a test container.
---
Makefile | 9 +++++++++
1 file changed, 9 insertions(+)
Comments
On 9/23/20 12:06 PM, Arjun Shankar wrote: > From: Arjun Shankar <arjun@redhat.com> > > Tests and binaries that use locale related functions need to run in the > correct locale environment when being debugged via debugglibc.sh. This > commit sets up the environment, specifically: GCONV_PATH, LOCPATH, and > LC_ALL for such tests and binaries when they are being debugged outside > of a test container. OK to commit. Reviewed-by: Carlos O'Donell <carlos@redhat.com> > --- > Makefile | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/Makefile b/Makefile > index 6dcfe40c25..e047e504be 100644 > --- a/Makefile > +++ b/Makefile > @@ -305,6 +305,15 @@ then > exit 1 > fi > > +# Container tests needing locale data should install them in-container. Agreed. And any non-SUPPORTED locales can be built outside of the container and then installed by the container script. We should try hard to make the container tests look like normal installs. > +# Other tests/binaries need to use locale data from the build tree. > +if [ "$$CONTAINER" == false ] > +then > + ENVVARS="GCONV_PATH=$${BUILD_DIR}/iconvdata $$ENVVARS" OK. > + ENVVARS="LOCPATH=$${BUILD_DIR}/localedata $$ENVVARS" OK. > + ENVVARS="LC_ALL=C $$ENVVARS" OK. > +fi > + > # Expand environment setup command > if [ -v ENVVARS ] > then >
On Sep 23 2020, Arjun Shankar wrote: > diff --git a/Makefile b/Makefile > index 6dcfe40c25..e047e504be 100644 > --- a/Makefile > +++ b/Makefile > @@ -305,6 +305,15 @@ then > exit 1 > fi > > +# Container tests needing locale data should install them in-container. > +# Other tests/binaries need to use locale data from the build tree. > +if [ "$$CONTAINER" == false ] `==' is non-POSIX. Andreas.
On Thu, Sep 24, 2020 at 09:51:11AM +0200, Andreas Schwab wrote: > > +# Container tests needing locale data should install them in-container. > > +# Other tests/binaries need to use locale data from the build tree. > > +if [ "$$CONTAINER" == false ] > > `==' is non-POSIX. Thanks, Andreas. I'll replace with `='.
On 9/24/20 8:55 AM, Arjun Shankar wrote: > On Thu, Sep 24, 2020 at 09:51:11AM +0200, Andreas Schwab wrote: > >>> +# Container tests needing locale data should install them in-container. >>> +# Other tests/binaries need to use locale data from the build tree. >>> +if [ "$$CONTAINER" == false ] >> >> `==' is non-POSIX. > > Thanks, Andreas. I'll replace with `='. The whole of debugglibc.sh is a bash script and as such may use bash constructs, and indeed has other instances of '=='. However, there is value in simplifying this to make it POSIX shell compatible.
diff --git a/Makefile b/Makefile index 6dcfe40c25..e047e504be 100644 --- a/Makefile +++ b/Makefile @@ -305,6 +305,15 @@ then exit 1 fi +# Container tests needing locale data should install them in-container. +# Other tests/binaries need to use locale data from the build tree. +if [ "$$CONTAINER" == false ] +then + ENVVARS="GCONV_PATH=$${BUILD_DIR}/iconvdata $$ENVVARS" + ENVVARS="LOCPATH=$${BUILD_DIR}/localedata $$ENVVARS" + ENVVARS="LC_ALL=C $$ENVVARS" +fi + # Expand environment setup command if [ -v ENVVARS ] then