From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 414075A026D for ; Wed, 5 Apr 2023 13:58:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680695901; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TtaMNvWs1xl891ff35nmBgzh/D3PhUxv1wOnuHTFahY=; b=J/rXJ5aq18xOhEmV7xom/R56girDsu1ok7k/45ESv88YNRgPTzrFP0wK3MVIPLxTlJ7X5O gBxRajHrRlBOtnVgmLlYjrWQYm+Rb21xNymRBbt1DgNj1hINuPvyiMq2VFzlk+/ujV1268 PsEbI0neSNug3RMCogwiI7NFfTH8Mz4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-343-sx7hVLIEO3OGHH4eMLCCBw-1; Wed, 05 Apr 2023 07:58:18 -0400 X-MC-Unique: sx7hVLIEO3OGHH4eMLCCBw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 313601C09507; Wed, 5 Apr 2023 11:58:18 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 826BF2166B26; Wed, 5 Apr 2023 11:58:17 +0000 (UTC) Date: Wed, 5 Apr 2023 13:58:15 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 05/14] nstool: Replace "pid" subcommand with "info" subcommand Message-ID: <20230405135815.2105f916@elisabeth> In-Reply-To: <20230404014638.3225556-6-david@gibson.dropbear.id.au> References: <20230404014638.3225556-1-david@gibson.dropbear.id.au> <20230404014638.3225556-6-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: R3FZD75EDT23R7K5FKD6S3FPTVHVMGSA X-Message-ID-Hash: R3FZD75EDT23R7K5FKD6S3FPTVHVMGSA X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 4 Apr 2023 11:46:29 +1000 David Gibson wrote: > The new subcommand gives more information about the holder process and its > namespace, and may be further extended in future. Add some options which > give the old behaviour for existing scripts. > > Signed-off-by: David Gibson > --- > test/lib/setup | 12 +++++----- > test/nstool.c | 60 +++++++++++++++++++++++++++++++++++++++++--------- > 2 files changed, 55 insertions(+), 17 deletions(-) > > diff --git a/test/lib/setup b/test/lib/setup > index e6180b1..6d7644a 100755 > --- a/test/lib/setup > +++ b/test/lib/setup > @@ -78,7 +78,7 @@ setup_pasta() { > layout_pasta > > context_run_bg unshare "unshare -rUnpf ${NSTOOL} hold ${STATESETUP}/ns.hold" > - __target_pid=$(${NSTOOL} pid ${STATESETUP}/ns.hold) > + __target_pid=$(${NSTOOL} info -pw ${STATESETUP}/ns.hold) Either 'pid' or 'info -pw' needs to be typed a few times, and 'pid' is simpler. I would have a slight preference toward demultiplexing the different commands in nstool rather than in scripts (with, say, 'pid' passing 'pidonly' as true in cmd_info()). And you always pass '-w', right? -- Stefano