From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id AF4FB5A0271 for ; Thu, 6 Apr 2023 04:50:13 +0200 (CEST) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PsQvz5mkmz4xFZ; Thu, 6 Apr 2023 12:50:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1680749407; bh=R1PcYzbHxkANVTNdia2orK01S8WRM3yKUPqysBGA954=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XYF4EaWo4/u+q4ju4WJ4EX58OCcStCvZiKv3ADena+3TrSKYkz5MCCP8Cf5oQPfgb IEUl7LsysRrgopas0N0JFKp69Eh5x9BkkV4FUL15czsKdRYjPRWKI4kPE5Qo4PiMYZ G3Nj4kSh9bMspSwHh+Z8usNij0Vwsn4Q6NmZSsTo= Date: Thu, 6 Apr 2023 10:13:30 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 05/14] nstool: Replace "pid" subcommand with "info" subcommand Message-ID: References: <20230404014638.3225556-1-david@gibson.dropbear.id.au> <20230404014638.3225556-6-david@gibson.dropbear.id.au> <20230405135815.2105f916@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QiiExO4UBUDKf6Ri" Content-Disposition: inline In-Reply-To: <20230405135815.2105f916@elisabeth> Message-ID-Hash: GAQAKMQQOK7MOOK7GNNDC7EXZQYUUOGW X-Message-ID-Hash: GAQAKMQQOK7MOOK7GNNDC7EXZQYUUOGW X-MailFrom: dgibson@gandalf.ozlabs.org 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: --QiiExO4UBUDKf6Ri Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 05, 2023 at 01:58:15PM +0200, Stefano Brivio wrote: > On Tue, 4 Apr 2023 11:46:29 +1000 > David Gibson wrote: >=20 > > The new subcommand gives more information about the holder process and = its > > namespace, and may be further extended in future. Add some options whi= ch > > give the old behaviour for existing scripts. > >=20 > > Signed-off-by: David Gibson > > --- > > test/lib/setup | 12 +++++----- > > test/nstool.c | 60 +++++++++++++++++++++++++++++++++++++++++--------- > > 2 files changed, 55 insertions(+), 17 deletions(-) > >=20 > > 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 > > =20 > > context_run_bg unshare "unshare -rUnpf ${NSTOOL} hold ${STATESETUP}/n= s.hold" > > - __target_pid=3D$(${NSTOOL} pid ${STATESETUP}/ns.hold) > > + __target_pid=3D$(${NSTOOL} info -pw ${STATESETUP}/ns.hold) >=20 > 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()). >=20 > And you always pass '-w', right? As of this patch, that's true, but a lot of that goes away when nstool exec is introduced. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --QiiExO4UBUDKf6Ri Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmQuDqMACgkQzQJF27ox 2GcChA//crk4I7CyuY3EQ0cbmzk/B1higsEM8PyJ9Bb3vvov+c1XTQ7ulmKMwGhq UQX/TU5qFKFTN8B3XSoPeCAXvwvGrv0Hh1DUo2vMjtSBwKHhnwPBlAGDxVPecvUJ RC8xB/KsXtEuzAwqg6RqXiqYHd8XGJPFfFWxIOg/sioy8Xjrbz5U9RaoOfAmWxzl Zkj2hGBgSOmgBzzDT2VeBxYA5r3QrJiy+fo1sOdq7ghWUsRBGkOQwhqOiMXfeK9T a7n3feEmQN4UNfwaRIt/MPnGVmPmewmxhGTmqKAtJMrlyrQR1nOSmeMKdsj9ZmwP /ERl5tZXleVg8n8ATpQrVbIO8tHG7A7dKoowxlVkFQFBi30ff/kuBig5HlOItBUz 1CnbNai59EPqYkqt5RjARZtjXpT4gapd4y7Zbwjr5KpSaPY08HJKdqq9czzsmtyl 5vFzw6t4KoMjtAW/nY6d3vvUsfpMI/6C5c9h3uivGy+gVznm4zYcGSjLpN9cDr+Q jaeIMRe9MBdZTQa6tzsohFnVNQ/VpErjV8rL/cXAZVQGGOUK/dI0nazkEm3l8XI9 TBNUEAZYXVOtXaTYWp1iSu6TA2j38IDy2CQD9ZblR1BpMKNspGSFZE4eguBMFfrM 921F87d9gVEYq/Owgwly2zi2INZ0K0zO4mqUZErtOlIa+FFigzE= =3YQ8 -----END PGP SIGNATURE----- --QiiExO4UBUDKf6Ri--