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