From patchwork Fri Feb 9 12:54:49 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: 1897050 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=GyQHwfPf; 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 4TWYjT0FySz23h4 for ; Fri, 9 Feb 2024 23:55:08 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F2AD3858407 for ; Fri, 9 Feb 2024 12:55:06 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 0BF103858404 for ; Fri, 9 Feb 2024 12:54:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BF103858404 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 0BF103858404 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1036 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707483294; cv=none; b=oV1i18IRXn4NR7EES4uXxvNi1AyrLDbyL9+YBiBBJW5oTCtlr0MKKolea4yszaFag5g80MMbbWGE2ua8UujYNyCBS0vj27stJNBtpH/1J92gcIU7VL/+fupwwgxzV9xA+GrIxzH6/AcHAPIMejORBK/jmMYn4db0OQN33f2tIj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707483294; c=relaxed/simple; bh=O4BUqedigOZixZIiB+7a//SIRXscU4UccWhqj8Kndas=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rPDnXjNSNnFfW6aHpoBv2ak+Mb2GfZ775dD7urCWj/zPlPp1xYGNtVJYsOvWDMqnsWJAywE3Jwr3iqCJQiSAXcFVE5n9YzxOYgwyYpP1GKTGIWZiDtvtRw2vTCTSge3Uac6m2hnygdGMH5EBf/A+K82VRI7jy02ZTuSLCjPgfJ4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-29041136f73so707365a91.0 for ; Fri, 09 Feb 2024 04:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707483292; x=1708088092; 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=8auGK+AnSOuoDcSmAZLTJuz9VSlg9Io2SH/Trjp/rbQ=; b=GyQHwfPf5behffsLNIqOzHI5TfurhW+DLR5lsqE0qr7wqwb3EuRSpqBKE33/rbG5yi 6l/SYaFCRBqOC9j2SawYQHh9OjbWz+l6DHvS8Re1eAOmpzPn5kZxCpQE67kYddWaOFEi GzU5taoC4qr2752NxT48ppLaO72EaUICg18JmThWy0vKI9bfeGLrpXImX0VWlRV+EBWy VxejNbhRS+7B1qa0xNSH/ZQNazWOQfWDm1wtZ0iYOevON6DNkPPtmVBxYgPRDthptqCK fG80ux784BrB8nh7RqeGxXfISTM6HePWiywsh+0fJtB1BAwW+d3Px1Sr4/YxG/Lg4Fj4 lLHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707483292; x=1708088092; 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=8auGK+AnSOuoDcSmAZLTJuz9VSlg9Io2SH/Trjp/rbQ=; b=AeJVHO6mWWfu7QYWSNK9jEYGMuSeFW/sOU8bHFIsmY2F5HD8ayQ7w21rsRQsaDnkSb 9U6AASOjIlkxgkVJETWc3N1AnehGlCJ+xAUZpIpi0NsvVxsdNJY0cYPb9nCvAM/NtStL 9c3R8Y3OIXUPWsMPm7W5FIhXhEMYtkARZyt96hk7dMR3B2wScnnZy0S0UbCuTuh6rdP2 zNUVOS/ZxmDTEUFOR+KT8Hpgbs3SkpvGwaP8KG/kotcuFHHgkd1BpGijZRah+4YyEvLh 4glOmnEuJFhMIcOu3b7wNRcGJBgr6dQ1tQl5FkYKh3msmaL2frwXK0rbGU4IpgN+83zh zLRg== X-Gm-Message-State: AOJu0YwxcwSe3L1EQoRIaX2r6Vd+/fDPslxYv0rT0DQ/IGlR7pXfQVEd KuBhxGUMhV8bGp/4UqAJKKjeoJU+cGZjqgWWXz45V2jslRn1TCcQ5+qraJmX X-Google-Smtp-Source: AGHT+IGMZghOcU98Sc81on/tJHx42gQZjZ+MMw59W4v7a8XvXWsLnGdYffNnt5d3CGwRenwxoC7qtw== X-Received: by 2002:a17:90a:fb88:b0:296:89e3:ab7 with SMTP id cp8-20020a17090afb8800b0029689e30ab7mr1413574pjb.7.1707483291896; Fri, 09 Feb 2024 04:54:51 -0800 (PST) Received: from gnu-cfl-3.localdomain ([172.56.168.224]) by smtp.gmail.com with ESMTPSA id t9-20020a17090b018900b00296cd82ac91sm1663675pjs.1.2024.02.09.04.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 04:54:51 -0800 (PST) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id EB3C2740098; Fri, 9 Feb 2024 04:54:49 -0800 (PST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: fweimer@redhat.com Subject: [PATCH] elf: Properly remove the initial 'env' command Date: Fri, 9 Feb 2024 04:54:49 -0800 Message-ID: <20240209125449.2352780-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'. Change tst-rtld-list-diagnostics.py to explicitly check 'env' instead. This fixes [BZ #31357]. --- elf/tst-rtld-list-diagnostics.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elf/tst-rtld-list-diagnostics.py b/elf/tst-rtld-list-diagnostics.py index 9e70e74bf8..dfba94de64 100644 --- a/elf/tst-rtld-list-diagnostics.py +++ b/elf/tst-rtld-list-diagnostics.py @@ -294,7 +294,11 @@ def main(argv): check_consistency_with_manual(opts.manual) # Remove the initial 'env' command. - parse_diagnostics(opts.command.split()[1:]) + options = [] + for o in opts.command.split()[0:]: + if o != 'env': + options.append(o) + parse_diagnostics(options) if errors: sys.exit(1)