From patchwork Thu Jan 23 21:45:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1228570 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-108935-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=FPuHDp/5; 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 483bSP3152z9sNF for ; Fri, 24 Jan 2020 08:46:13 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id :mime-version:content-type; q=dns; s=default; b=BAF49jb9W3Y0RGOc LtEoO0xRjQth/0zG1e8BRyT1IlLU/JnqQs9ramfZImUoX1J6OZQvMplP9BAGkbM0 LOttJLwQqH+obHs0Fu169Tdl59jfmRz7fBs52d6G6qITI8g5L5narcVtF/q8pzqp IdgksQy9VBLQsuqSO7mAfI3SiDY= 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:date:from:to:cc:subject:message-id :mime-version:content-type; s=default; bh=jjKRQSo5mHCHKeRmCwlTZp ZC7Wg=; b=FPuHDp/5o+n/+7K7dNf/LZtfTYmc3DdH2T3j0qWGcVHyKi9ZriimDf TIJ5uZpOjCizjmXjRM8Tny8pbXqD4dw9OmsiAnRhNV3Ng9qsMKoIB5VBzrDylC5P pyrB989SJwHbVDKFNP7skM9iYQQt2tLpMbwgoF46Hhkmx191FhkFM= Received: (qmail 23253 invoked by alias); 23 Jan 2020 21:46:07 -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 23200 invoked by uid 89); 23 Jan 2020 21:46:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: esa4.mentor.iphmx.com IronPort-SDR: InQe4jsGDYWpGqbKmQFH4gfc0ehxvV84I9mB5Dl+wbqG5yLzD782s4A9othjBBRew/4zV+2dxE TJSn0h+K5SIh2zTuR2dXAr0OhqEsKdAsfOX8ZbLudiLM/m7qpPtHclOvnaHJY2LMfjnoAjrq91 ndNF9x+l06SQDsL2Z4YN84JPQa2+87b5icSLII0j3HH6TZIHrJxqTuTzqaOJdYIR8hr4oLVU8A HWNOgmtSewezrQsSaJMWA6hqrou9DXbxwonVTEM6aT7mJHNFhW97dPV1RvukBVyLj7xzeuPaJy 3yQ= IronPort-SDR: O+ZHakQvh/DM7Sb+PC6oglL6fxk0/dVJn9/H3Kl9PTw7bcbcskN4Yrf2MBCpHfeBlfMwUR5Ad/ Q1UQGZ2nmuzA== Date: Thu, 23 Jan 2020 21:45:52 +0000 From: Joseph Myers To: CC: Subject: Fix locale/tst-locale-locpath cross-testing when sshd sets LANG Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 The locale/tst-locale-locpath test unsets LANG, then runs a test with test_wrapper_env and expects LANG to remain unset for that test. This does not work for cross-testing with cross-test-ssh.sh when sshd (on the system specified as an argument to cross-test-ssh.sh) is configured to have a default LANG setting. The general design used in cross testing, after commit 8540f6d2a74fe9d67440535ebbcfa252180a3172 ("Don't require test wrappers to preserve environment variables, use more consistent environment.", 6 June 2014), is that environment settings required by tests should be passed explicitly to $(test-wrapper-env). This patch changes tst-locale-locpath.sh to pass an explicit LANG= rather than expecting "unset LANG" to be in effect for the program run under test_wrapper_env. Note that this does slightly change the environment in which the test is run natively (empty LANG instead of unset LANG) but that difference does not appear relevant to what it is trying to test. Tested for Arm that this fixes the failure seen for that test in cross-testing. Reviewed-by: Carlos O'Donell diff --git a/locale/tst-locale-locpath.sh b/locale/tst-locale-locpath.sh index bafdf91e20..f37d452723 100644 --- a/locale/tst-locale-locpath.sh +++ b/locale/tst-locale-locpath.sh @@ -34,10 +34,8 @@ trap cleanup 0 rm -rf "$testroot" mkdir -p $testroot -unset LANG - ${test_wrapper_env} \ -${run_program_env} LC_ALL=invalid-locale LOCPATH=does-not-exist \ +${run_program_env} LANG= LC_ALL=invalid-locale LOCPATH=does-not-exist \ ${common_objpfx}elf/ld.so --library-path "$LIBPATH" \ "${common_objpfx}locale/locale" \ > "$testroot/stdout" 2> "$testroot/stderr"