From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by sourceware.org (Postfix) with ESMTPS id 8861F38582A0 for ; Fri, 9 Feb 2024 13:53:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8861F38582A0 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 8861F38582A0 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b2f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707486819; cv=none; b=SYNSTbuKrCtRAMxWwWQ+Rkg0JL5E0bML39sDlbmBzTd8FVqFUjiKfCF3izw6aAkZd1mDnMAEQQAtKporvJHYrLCfClvlMzR5xzxxKjDpzxYC3d9hUXtlE/4N2WWCOnasB2DVH0C28T1uEWNVilHB9zRvIfLYCJ+6yF3JV7mtPhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707486819; c=relaxed/simple; bh=cMS8SilK6qZmXqkqo4i2a7EW/F1ySnmR+f3hUKbBRQ4=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=TpYNQSZ864pnYfxYual4ONtw7Gf8Dm/MotU+DHX8Jv0igkZ7NIrW88Bmgpq4EeiJj2IBjDHNB3ZRx66pACUsKBbX89bpGWYzd6FcUd7q8q5TeXgOXCC03Ef/0F6S/UgJZdPYbD5/RBHgeNShrxpy2NSZV1+RyYLuXBOYbAWyzo0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-dc6d8f31930so775378276.0 for ; Fri, 09 Feb 2024 05:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707486816; x=1708091616; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+MDicFVCJrxqcZ43GvbfPcY6dUKu5c0ZzocoItKZZlg=; b=N3XdrPteIEOFZ5b8tiRoIWMX6uR/SfWxf3+IcIyOPrYGr2/ez6TyhTRwk7l1XyetWd vjWTpXYXj9k+VgAfvquW8y0Fp/UKWuHrdjXuL+qJl+zmkOijvbADaMi8T7+oF7ZuSohP Tg1zGRFY276CTiccB6FsRUpi3y4bK6JeGaI1mRj78y+vReB/a6FGN/ElkVeS3QUW0AmC d/3nvZCK4ekrJZfeIwy8AJdgEWJi2Z1NpoLrQW9tGWZZY/UvrEujXUVNJQ00cGGGtaul 9uu4QnU7tGv2Aqstxo29OhNGdEj9pVZv9XexfcG7ISie+nJLrhjrDf959g53AYVhJ4vK txgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707486816; x=1708091616; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+MDicFVCJrxqcZ43GvbfPcY6dUKu5c0ZzocoItKZZlg=; b=XIn8nBw18EUAwtU8B93qSDUYOu4X77w2vz/u2PgR7hVzsOTRNlHjZqy+RDGWZ6m+Q6 KUal3AWI7QE4ZcYqWSs44ezfIUdgZZhHOGuSqlb/k5KP2ZkPY1VtHxZycqUxhhPkHKdA RC4JtKFpuZcOWBobqCFKQ493O2BGw6AFYYT/VPWvciOpIykHrZFzfVdo6I8SIV+xoSBS nVIK15SECJslz379zdY0a2OuuEN2lyvlXcaDCB0UrVbxrdyGAh3XcmLBbRa446WOUmJu ICCE8126cVWQv6MLCdIffW1Ow4bnvlN35s87kWTCjeqwYeBvhsb2UD5k+6zhwqIeH0Yg qy5w== X-Gm-Message-State: AOJu0YwTlAClz1rl4gtuOJhnkWIrcZ2QGrb3Q/PpkQ00xKDEWAK/8Wta pXVb/WNUxjRvSBCJE0xdlfVWEk1q3R0MNLmo+UrL4qf8j6RwkA/4htt8ZW3bYUd7yvUD93s4Pbk fEDQQWSQl7+E13R4jKNvIeH7YV74= X-Google-Smtp-Source: AGHT+IGpMh6Cse0TX544fGi6lF+vXLsQ5mXrS3hRIb2nQduXgg88z0ne0iIqU09kOq5GT1wGwAksWX24MfmEeFSOijE= X-Received: by 2002:a5b:ac7:0:b0:dc7:46fd:4998 with SMTP id a7-20020a5b0ac7000000b00dc746fd4998mr617752ybr.13.1707486815712; Fri, 09 Feb 2024 05:53:35 -0800 (PST) MIME-Version: 1.0 References: <20240209125449.2352780-1-hjl.tools@gmail.com> <87mss9aicg.fsf@igel.home> <87bk8p7oki.fsf@oldenburg.str.redhat.com> In-Reply-To: <87bk8p7oki.fsf@oldenburg.str.redhat.com> From: "H.J. Lu" Date: Fri, 9 Feb 2024 05:52:59 -0800 Message-ID: Subject: Re: [PATCH] elf: Properly remove the initial 'env' command To: Florian Weimer Cc: Andreas Schwab , libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3020.6 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 List-Id: On Fri, Feb 9, 2024 at 5:30=E2=80=AFAM Florian Weimer = wrote: > > * Andreas Schwab: > > > On Feb 09 2024, H.J. Lu wrote: > > > >> diff --git a/elf/tst-rtld-list-diagnostics.py b/elf/tst-rtld-list-diag= nostics.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 =3D [] > >> + for o in opts.command.split()[0:]: > >> + if o !=3D '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 How does removing .split() work? The argument is "/export/build/gnu/tools-build/glibc-apx-sde/test-sde.sh env /export/build/gnu/tools-build/glibc-apx-sde/build-x86_64-linux/elf/ld-linux= -x86-64.so.2 --list-diagnostics" We need .split() to change it to proper arguments. > shell=3DTrue. > > Thanks, > Florian > --=20 H.J.