From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 5C6555A0268 for ; Mon, 27 Feb 2023 14:29:55 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PQLvg5WMJz4xDp; Tue, 28 Feb 2023 00:29:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1677504591; bh=LfjD49rqhm7OViIUY6Z4RUyR3PJSm+GgY+t+k5Vjw+o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Fj+X0f0OonXgrIGYvIaV9p156QbXcs9lBx2Zf0r642tMEKnnYHd4CtL3fKmxf4NpV oV5lm1yzHnNd16LvHAP69JUUH+78uyW87kvfseQp+w2vxuQwlgPJYsdAgi/CpZn8l9 S0ozkV36E6+v9t2lH2A7BsB0EZ/M+9oMWqsC4Bcs= Date: Mon, 27 Feb 2023 21:54:45 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] doc/demo: Fix and suppress ShellCheck warnings Message-ID: References: <20230227100014.225870-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tgt7HbyOEqKdMisM" Content-Disposition: inline In-Reply-To: <20230227100014.225870-1-sbrivio@redhat.com> Message-ID-Hash: 5CYI2GF3FJL6R5ES2XOQJLXEZCNUNMLI X-Message-ID-Hash: 5CYI2GF3FJL6R5ES2XOQJLXEZCNUNMLI 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: --tgt7HbyOEqKdMisM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 27, 2023 at 11:00:14AM +0100, Stefano Brivio wrote: > ShellCheck reports (SC2034) that __qemu_arch is not used. Use it, > and silence the resulting SC2086 warning as we want word splitting on > options we pass with it. >=20 > While at it, silence SC2317 warnings for commands in cleanup() that > appear to be unreachable: cleanup() is only called as trap. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > doc/demo.sh | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/doc/demo.sh b/doc/demo.sh > index ed71ffb..5b05ddf 100755 > --- a/doc/demo.sh > +++ b/doc/demo.sh > @@ -110,6 +110,7 @@ next() { > } > =20 > # cleanup() - Terminate pasta and passt, clean up, restore TTY settings > +# shellcheck disable=3DSC2317 > cleanup() { > [ -f "${DEMO_DIR}/pasta.pid" ] && kill "$(cat "${DEMO_DIR}/pasta.pid")" > [ -f "${DEMO_DIR}/passt.pid" ] && kill "$(cat "${DEMO_DIR}/passt.pid")" > @@ -223,7 +224,8 @@ into_ns() { > echo "Use ^C to terminate it." > next > =20 > - cmd qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg \ > + # shellcheck disable=3DSC2086 > + cmd qrap 5 ${__qemu_arch} \ > -smp "$(nproc)" -m 1024 \ > -nographic -serial stdio -nodefaults -no-reboot -vga none \ > -initrd "${DEMO_DIR}/demo.img" \ --=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 --tgt7HbyOEqKdMisM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmP8i+8ACgkQzQJF27ox 2Gd2Xw/8D1rblIeIezP86sjJdnwJM07U3BMmc1Ws/2wv2apTrW7CleHS0PDJW692 8M3nYwN26FzUF3pWHKwnF+MDBrCboYi92U2dGnWMGjty5h3OeLZHW82DXJdKymRL AOnjXAJrVs/xY5z4yzyMnEqoetwG6PQ1mRrS+52chGKuOC+G/C9aXOo0tD1W9+c/ P/k2NhXfskH7shph0u2cuXOB6FHRMT6Fp8SYt7bIb0xXi9OjxkNRSrUzvEa9ZrFr cig/BEWkn+yNiMNLOoTAegdRP6drLjsanmeDr9WoB/91PsRBTmIIs+plQpY5F8/f GeA//aIXA/rGGK2P4Ns8GybTcCB7Uih23958BUkSt0KGn4XTxbjX9nIIoNrjsdb/ WqwZCnXdBOQlm3EuGIU0dXC/aja7FqvdK4KbE/m69pj9PhdUbhqD7r+TQFyAA95J +/RvJF5EkO0rF9w2RmDuEEl5mCfNVifFGSCRS3+dhvn+b9umODLf2JODW1xjBLYk 0/7CW1fSIDN0S3HQ9m1h518jqJI+iVJBOVUphw2g/FsOIh9cobjMUZowB5ykf0au lQ6Ol8TtGkWdtZ1BIweyeAzLjhNZMJg0sDzo/7BgGl8l6AU4civuNBQ9H+JKXFWh bNiu3RI3Aq29Yop9Q4Ia4KLOeoUxp2UocHZphp2qGZJAga0ivaE= =Wgf3 -----END PGP SIGNATURE----- --tgt7HbyOEqKdMisM--