From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: Re: [PATCH v2 00/11] Improve command dispatch in test scripts Date: Fri, 09 Sep 2022 17:21:27 +0200 Message-ID: <20220909172127.0878bfba@elisabeth> In-Reply-To: <20220908014920.1474597-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4440807332035445348==" --===============4440807332035445348== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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. -- Stefano --===============4440807332035445348==--