From patchwork Fri Feb 9 13:58:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1897058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=WSmnPvdp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TWb6X6GFHz23g7 for ; Sat, 10 Feb 2024 00:58:28 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 75985385840E for ; Fri, 9 Feb 2024 13:58:26 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 47D783858403 for ; Fri, 9 Feb 2024 13:58:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 47D783858403 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 47D783858403 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::430 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707487091; cv=none; b=PphdrJrmd/tW3EYW85hfOXMWwIb4Fim4tMmD/egyAHYFTLOC4dH6VYLVjr0JQnLG/co54rTojVGQrIPswFX0NMVqgm8CQbGAzJOBXXa2oAHXe8qy7Ejrgx1a9FaYfaLEwCIaoHBY9lfU+JdcCAyWwbZqn4pRlIqCm1d/haYUdUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707487091; c=relaxed/simple; bh=n+AVM0EJjWQAmRB6gYyt4pPuuybSCPK8l60xVMLpht4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=vgBtIC1kpHu4qraPbnjFhtem0oyHSxXsplcMnGphGogb9VTppB+7xe+fuBRGvkUCFtlySSaHjbUmjjEyFMUa6MaM0OzBc6+RNI1sBlSAMzl1Bvj6Eie6W7dgwgG6xv7MJ2kB+jkh/bRRUgJ3wQ9auC63qMkQAyNhoyrg8qw05+8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6de3141f041so776025b3a.0 for ; Fri, 09 Feb 2024 05:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707487089; x=1708091889; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1vyf3M2qGYij8KUc8d5GeH1cEoNjVP48Zh2NPTGEFMA=; b=WSmnPvdp1sLOdKzewzkaB8wT9O+xYKt14Qncao5BoAFyC8tRIfsC2gfLhgY74ct5II dWTxssKOAIoPJC0n/NhXreng+b40XCvOftj/pM+H3FBUct+344GhWaDMwmCq2QFBUIKB 39NBtWql5SABhclNk/nnvbAL3IFQCjedie83jm0kceC0xMyt2wfuyLNfwFxwZRqYObXK kEDHzz6yY3o3BSoqYUp5Zzz84aNG1YxiNWBSDiSPK5uWnM9Z+RSB64u6fUSyzgP2PjIo 3ST17YeGkgF3x2ph5X4UuszDCAxcJops102NvDwKhbX1xoBXfFWyfAozwq6JdILqm4+c kuEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707487089; x=1708091889; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1vyf3M2qGYij8KUc8d5GeH1cEoNjVP48Zh2NPTGEFMA=; b=lwgxkzXVh0KAfKcqiyiBWnvOUogBDX6He11h+obKKu8BsEbsoEFw3jLST9Y+Q6iSqZ Si+lx46PHfyQDVh4+1t2yGor47RO6nMI8/9/UFG/mgSVzdEfO1W6quB+XVCWYy13s6b7 B8v8gkZwVeRzed5TxorcP4VaH/dIdmWS0XOw6alTuwJpVBfC3SDnzFo6LxamWrDlRgeO m2OKZjifFwyEi/jtJOEM6eJSx/Q0zPhFWgrlcoWN+Zf2n6pCfcK8aLvv8fodcoU4wjXj O/rFholEyx/CF3yommX1kdTCdh9X5W5yzr0Pjul8113P77/luMTrQU9+jEuwIJQRAYl2 8pXQ== X-Gm-Message-State: AOJu0YxCkwp/crfNOVWzxdoxGuWSRmCoxWN46YOe4EKN5TpXg/cnnfDV QVRQiLty8UeEN5cZTcFHUNxXrhUO0IfnJNOf6iwL1N5xJJjOQtQK X-Google-Smtp-Source: AGHT+IEHT/9eg1bpTo1DRzdx1rGvayzIj1Sf7Qi36fEfGUkZrnwMGMJE9j/JlrGP82XO4Q3fSKAIIw== X-Received: by 2002:a05:6a00:bdc:b0:6df:e85e:ecc6 with SMTP id x28-20020a056a000bdc00b006dfe85eecc6mr1630062pfu.3.1707487089179; Fri, 09 Feb 2024 05:58:09 -0800 (PST) Received: from gnu-cfl-3.localdomain ([172.56.168.224]) by smtp.gmail.com with ESMTPSA id f7-20020a056a00238700b006e089bb3619sm500907pfc.112.2024.02.09.05.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 05:58:08 -0800 (PST) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 4D80A7400A0; Fri, 9 Feb 2024 05:58:07 -0800 (PST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: fweimer@redhat.com Subject: [PATCH v3] elf: Don't remove the initial 'env' command Date: Fri, 9 Feb 2024 05:58:07 -0800 Message-ID: <20240209135807.2353939-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3023.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org tst-rtld-list-diagnostics.py is called by "$(test-wrapper-env) $(objpfx)$(rtld-installed-name) --list-diagnostics" and $(test-wrapper-env) is set to "$(test-wrapper) env". When there is a test wrapper, it is incorrect to use: # Remove the initial 'env' command. parse_diagnostics(opts.command.split()[1:]) to remove 'env' and there is no need to remove 'env'. Don't remove 'env' and pass shell=True to run. This fixes [BZ #31357]. --- elf/tst-rtld-list-diagnostics.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elf/tst-rtld-list-diagnostics.py b/elf/tst-rtld-list-diagnostics.py index 9e70e74bf8..5e05ebc05c 100644 --- a/elf/tst-rtld-list-diagnostics.py +++ b/elf/tst-rtld-list-diagnostics.py @@ -33,7 +33,8 @@ except: self.stdout = stdout self.stderr = stderr - def _run(*popenargs, input=None, timeout=None, check=False, **kwargs): + def _run(*popenargs, input=None, timeout=None, check=False, shell=True, + **kwargs): assert(timeout is None) with subprocess.Popen(*popenargs, **kwargs) as process: try: @@ -293,8 +294,7 @@ def main(argv): if opts.manual: check_consistency_with_manual(opts.manual) - # Remove the initial 'env' command. - parse_diagnostics(opts.command.split()[1:]) + parse_diagnostics(opts.command.split()[:]) if errors: sys.exit(1)