From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 5D0F63858C35 for ; Fri, 9 Feb 2024 13:30:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D0F63858C35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5D0F63858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707485411; cv=none; b=wlcVwWaJmaqxcTNNVNhiUsG0LQrVLDQy9mi3FKfTdKKoAKCJq1ENDJKgVDomLmAu8ijpSbEXpuxp6WjaTK7o3UAwjARR5NCPiPoBvqCSRZBsZka3XbHGvYe6/rlDjlX27RfuMn+nA7RQ0lrTbnjWwqSkh+9PuVybiKjAUi1GtXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707485411; c=relaxed/simple; bh=jOPmxGZdLCKhdw8q2DibTNtuBe3hQ/hqPhWBcDX1zy0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=B97xseX0KGb8IPFVPKeyIBiZmkZEnu6dNXYxBm1RXo5jj00m7X/aCBKMw6NKSeNFzCkXabCzOAuT2T5B+AeFyhhRcyX7SlqJacAL4hY9r9DXZwcRVO7VoEi+ihbXjPHi3Ju18GSZZxbBPmD1riFKADkvoDCjHOXUDXIi++BOJvY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707485410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xLpxqoMgCULD5YvMWnSqEQFX1qL5HMPqUImtPnRVc3s=; b=hR88v03u8X/iGUnnxfHgzPXXa9k0nLyfHANbxa7edPPtMAcpOMlKCGLzHdtYTIAoJQIGUb OZHgc+7F7jY+v9g4V+KzW9wDjY9oDh9VctYTBoHZu7Efrfaw9hoLnGH6+28rCWL/wadozQ CTNq2FkkKhAW+fLoq3d1YFG07q/ZKrI= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-119-ZeOpoKu7PaS5iNsFUxVa5g-1; Fri, 09 Feb 2024 08:30:08 -0500 X-MC-Unique: ZeOpoKu7PaS5iNsFUxVa5g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4CCCA381201C; Fri, 9 Feb 2024 13:30:08 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.58]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5BA451103A; Fri, 9 Feb 2024 13:30:07 +0000 (UTC) From: Florian Weimer To: Andreas Schwab Cc: "H.J. Lu" , libc-alpha@sourceware.org Subject: Re: [PATCH] elf: Properly remove the initial 'env' command References: <20240209125449.2352780-1-hjl.tools@gmail.com> <87mss9aicg.fsf@igel.home> Date: Fri, 09 Feb 2024 14:30:05 +0100 In-Reply-To: <87mss9aicg.fsf@igel.home> (Andreas Schwab's message of "Fri, 09 Feb 2024 14:16:15 +0100") Message-ID: <87bk8p7oki.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: * Andreas Schwab: > On Feb 09 2024, H.J. Lu wrote: > >> 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) > > Why does it need to do that in the first place? Good question. I must have copied it from scripts/tst-ld-trace.py. I think we can remove the .split() and run the command string with shell=True. Thanks, Florian