From patchwork Wed Sep 23 16:06:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arjun Shankar X-Patchwork-Id: 40484 Return-Path: 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 ; 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 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-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Gabriel F. T. Gomes" Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" From: Arjun Shankar 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. Reviewed-by: Carlos O'Donell --- 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. +# 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