From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: Re: [PATCH v2 00/11] Improve command dispatch in test scripts Date: Sat, 10 Sep 2022 16:59:22 +1000 Message-ID: In-Reply-To: <20220909172127.0878bfba@elisabeth> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8248705792363134587==" --===============8248705792363134587== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Fri, Sep 09, 2022 at 05:21:27PM +0200, Stefano Brivio wrote: > On Thu, 8 Sep 2022 11:49:09 +1000 > David Gibson wrote: > > > Sorry for the resend, but I found and fixed a couple of warts in this > > series. > > > > The test scripts need to dispatch commands in various different > > contexts: on the host, in namespaces, and in guests. Currently this > > is done by running each context in a tmux pane and simulating typing > > into that pane using tmux commands. This has a number of problems: > > > > * It's slow > > * Getting the results from programs is tricky and error prone. We > > can misparse output if: > > * The window isn't large enough > > * Commands produce output which looks like a shell prompt > > * The shell doesn't have the prompt we expect > > * A accidental keypress while the tests are running can mess up the > > test run > > * We have to issue explicit "echo $?" commands to check if things > > succeeded > > > > This series adds a new subsystem to the test scripts for dispatching > > commands which accurately preserves output (both stdout and stderr), > > and exit codes. > > > > Most of the testsuite is converted to this new system. For now the > > distro tests still rely on the old approach, since they have some > > complications that require additional handling. That does, alas, mean > > we have some ugly transitional code remaining. Oh well, we should be > > able to clean that up at some point. > > > > This series is pased on the previous series cleaning up the > > performance tests. > > > > Changes since v1: > > * Removed a couple of commented debugging lines in patch 9/11 > > * Removed a no longer necessary pipe-pane in patch 9/11 > > In general, this looks like a big improvement, and I would try to apply > it basically as it is (I haven't run the tests yet). > > There are a few nits that might need to be addressed. I can fix them up > on merge, unless you re-spin this, but I'd need some help with the > comment on 11/11. I'll send a respin next week when I can re-run the tests. This weekend I've realized another problem with the current testsuite: it reacts very poorly if the host has no IPv6 connectivity. Unusually for Australia I do have IPv6 at home, but not while I'm travelling with mobile data. I could get it using a VPN, of course, but it's a hassle. Anyway, that's another reason why having a more controlled artificial network environment for the tests would be valuable; I'll tackle that when I can. -- 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 --===============8248705792363134587== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ0FBZEZpRUVvVUx4V3U0L1dz MGRCK1h0Z3lwWTRnRXdZU0lGQW1NY05iWUFDZ2tRZ3lwWTRnRXcKWVNLOEtoQUFqNFh0QWYxQmxo ckRGWUhYanl1UHg0K3FCUHM5Vk1ucnRqUGJZYTlJRjIxMUx3OU5jME1hV25mVwpISHdrR0FvVGh2 ZkxQb0o1bHNtbFFtVzBGKzl6QlpVdzVBdHBJRVZhSUFBZEtRNVN5OUV2ZWZaYkQvaUJjQkNxCkdo S3I3TVVyN3NjTGpxeGJXdWp1ZGZRS1k1cCsrMDR3OTIyS1BWRVdaUUFHQjVJbWJwLzJOZGlGZkIw ckFJMUQKaVhGRWg2d0xWK2M1TWRmUjhHTjgvRGJOV3Z2R1dXMkdaMXQzRDA4WTF1aEFwbUthUU43 anViTW9aRFcxTmJreQpYVE5lcE0xd1BlUm1rSGZZZUd5UWk0aFB5bnNsckhKZ3dKREVYdUZGVnox aEV4NWJ1ckVoUDdmT3hpckZOME55Ckx1czVMRm5JaXNEb3BmQXNJMnZTNm1mTFBsNFFXOGdqVHp2 YWpvY1BlZk1BcThkczArRVVRb3UxYms0T04vcmEKTkhrQzY3WmtSZ1J5ejNvL0lMdm54VFN1QlhR TWxBWTZ3Q1RhcWxNWFRWSG82aGJtRHJEVGhaT0U2TmFCd0pYRwpNUUptREE0c015d0tTR1UvL29j SnZaTmhNekNkMVlvSTh2dGsrbWpSNEVOQWQ3VGRkWDZkUzVTOHlWZDlFZ3VhCkxxR1lGdnJWU211 WW8rZnRp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