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 A31085A0082 for ; Mon, 13 Feb 2023 04:12:04 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PFTsF73z3z4x80; Mon, 13 Feb 2023 14:12:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1676257921; bh=auZbDyS05sPo4CRVETFc+nt8JtkI+ofkKemEnyCsKtA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KO7qvCpjkE/bNS6JUBEcvxK8pRAj/y+BO9B6j7vI5p1Ax8YnUx8cF9AZC9m7khAF5 6fOjmyisPRAMkZJXRoW6jtyZytba8m6NiQ4JYDs3C9qWrKeJ1DYZdZQJ1vUYYvX6tk tqj1vkEczaeCZg5zp7uWaPBkcgTGDndjX1CSHAZc= Date: Mon, 13 Feb 2023 13:30:07 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] test/pasta_options: Ignore failures on shell 'exit' Message-ID: References: <20230213011212.1198757-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YeXmCvXKQdCwCVIn" Content-Disposition: inline In-Reply-To: <20230213011212.1198757-1-sbrivio@redhat.com> Message-ID-Hash: 4TRWCCHOUCUGZ3H5GN7VB3K3FF2GHHXL X-Message-ID-Hash: 4TRWCCHOUCUGZ3H5GN7VB3K3FF2GHHXL 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, Paul Holzinger X-Mailman-Version: 3.3.3 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: --YeXmCvXKQdCwCVIn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 13, 2023 at 02:12:12AM +0100, Stefano Brivio wrote: > On shell 'exit' commands, running shells from pasta, we might get: >=20 > Cannot set tty process group (No such process) >=20 > as some TTY devices might be unaccessible. This is harmless, but > after commit "pasta: propagate exit code from child command", we'll > get test failures there, at least with dash. >=20 > Ignore those explicitly with a ugly workaround: we can't simply do > something like: >=20 > exit || : >=20 > because the failure is reported by the shell itself once it exits, > regardless of the command evaluation. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > This is already applied, I needed to unblock tests. Posting anyway > for reviews. >=20 > test/pasta_options/log_to_file | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > diff --git a/test/pasta_options/log_to_file b/test/pasta_options/log_to_f= ile > index 587bf8e..29fb2c8 100644 > --- a/test/pasta_options/log_to_file > +++ b/test/pasta_options/log_to_file > @@ -34,12 +34,14 @@ set PORTS -t 10001,10002 -u 10001,10002 > set LOG_FILE __STATEDIR__/pasta.log > =20 > passt ./pasta -l __LOG_FILE__ > -passt exit > +passtb exit > +sleep 1 > check [ -s __LOG_FILE__ ] > =20 > test Log truncated on creation > passt ./pasta -l __LOG_FILE__ > -passt exit > +passtb exit > +sleep 1 > check [ $(cat __LOG_FILE__ | wc -l) -eq 1 ] > =20 > test Maximum log size > @@ -85,6 +87,7 @@ check_log_size_mountns > test Timestamp consistency after rotations (no FALLOC_FL_COLLAPSE_RANGE) > check tail -n +2 __LOG_FILE__ | cut -f1 -d' ' | tr -d [.:] | sort -c > =20 > -passt exit > +passtb exit > +sleep 1 > passt umount __STATEDIR__/t > passt exit --=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 --YeXmCvXKQdCwCVIn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmPpoKkACgkQzQJF27ox 2GcPJxAAjZnQwXP67Qvui18T6UEEyMzTrxe/XfqbyQFwDA6WU+GHI4Jnl5eob0F7 4CmkXcCXkb7W1v2dkZ4xCizKud1N7FIIxZMYUS05lkPexcjHI97U++WtqwDfgcdk 8hu9czX0LTRCLpr9KUxnn2GgHvAhj3sxVm9KeYVEHbWMCsfNgIdpeIDkJG5lqzht qHYch1Xxt3ZYmyz0O7AuI+c77PA5jG2i86ohyjALHnM4WzlUFEWYIYfGEBWGuNfd jE9StDaMdhMjTxhLbLZkbpBZ1g4CSZKJJUBTEx/TqBs9eEkbgajEBKbiP1N62ity O7J+aYqGb1ArSsgD7rfkpJaPMCg3bw3qodfDsLu4919NkAnhsDU5RpDpeoacBzNm o+O0pFoR7+szEPHSkzqH8j7GFV0Ht0GHyayHlCNPHU/RDafmrT0V6U87ux3Misds 3lNF+QtatR9NrQhPKqMmn5Xvi4FWuheBMSCVILdHlyeqGhF8xgdSnvmUaaReBUhr Nphaty/oZ8G+og9ztkcdqYHF0g/yOhNDChi7VY4hY+MGZb1YEd0ETko4474YPbPT loch4LRUl49rDiy68zuvvyjwtYbpEEgEKw7FzSaTTzMn2Fs9SdUVjstaqPsCT9MO K33LbNKo6hCU5rvixtCTpKdSjXkfaj109X//M+LkaD9FjOJNNQ4= =JBlO -----END PGP SIGNATURE----- --YeXmCvXKQdCwCVIn--