[PATCH v8 0/5] Introduce first exeter based test infrastructure
Here's a new approach to building passt tests with exeter. This new one no longer uses Avocado in the default case, although it would still be possible to manually run the exeter based tests with Avocado. For now this only does simple tests, to show how the integration could work. It adds some new trivial "smoke tests" and converts the linter and build checks to exeter. More complex tests will require building the tunbridge library we've discussed. A lot of the work for that already exists in my earlier exeter test series, but it will need some rework to split it into a separate component. v8: * Create video links for exeter tests too * Fix some bad indenting v7: * Use "exetool list" rather than "--list" directly to get test manifest. * Update Makefiles to automatically update exeter sources as necessary. * Update series cover letter removing some outdated information. v6: * Use exeter's new metadata support to print nicer test names v5: * Updated according to Stefano's review - Fixed a number of whitespace errors - Improved many comments and variable names to make things clearer * New patch adding parallel test execution with BATS * Improved autodetection of exeter tests using "exetool probe" David Gibson (5): test: Extend test scripts to allow running exeter tests. test: Run static checkers as exeter tests test: Convert build tests to exeter test: Allow exeter & podman tests to be parallel executed with BATS test: Explicit specify forwarding ports for pasta in log rotation tests test/.gitignore | 2 + test/Makefile | 24 +++++++- test/build/all | 61 ------------------ test/build/build.py | 109 +++++++++++++++++++++++++++++++++ test/build/clang_tidy | 17 ----- test/build/cppcheck | 17 ----- test/build/static_checkers.sh | 26 ++++++++ test/lib/exeter | 58 ++++++++++++++++++ test/pasta_options/log_to_file | 10 +-- test/run | 18 ++++-- test/smoke/smoke.sh | 33 ++++++++++ 11 files changed, 267 insertions(+), 108 deletions(-) delete mode 100644 test/build/all create mode 100755 test/build/build.py delete mode 100644 test/build/clang_tidy delete mode 100644 test/build/cppcheck create mode 100755 test/build/static_checkers.sh create mode 100644 test/lib/exeter create mode 100755 test/smoke/smoke.sh -- 2.51.0
Introduce some trivial testcases based on the exeter library. These run
passt and pasta with --help and --version options. Extend our test
scripts to run these tests.
Signed-off-by: David Gibson
Move the static checkers from the current DSL to exeter.
Signed-off-by: David Gibson
Convert the tests in build/all to be based on exeter. The new version of
the tests is more robust than the original, since it makes a temporary copy
of the source tree so will not be affected by concurrent manual builds.
Signed-off-by: David Gibson
As a proof-of-concept, this adds a "make bats" target which will execute
both the podman and exeter based testcases in parallel using BATS.
Signed-off-by: David Gibson
test/pasta_options/log_to_file uses tcp_crr in a loop to generate log
messages for what it's actually testing. For this to work, pasta needs to
forward two ports. We set a PORTS variable with the options for this, but
never actually use it. The test works, because without the options we use
automatic port forwarding.
That makes the test more fragile than it needs to be, in a way that's not
at all related to what we're actually trying to test. Avoid this possible
point of failure by explicitly specifying the forwarding.
I encountered this because Fedora has now updated to a kernel with the
/proc/net lseek() bug.
Signed-off-by: David Gibson
On Fri, 5 Sep 2025 16:43:17 +1000
David Gibson
test/pasta_options/log_to_file uses tcp_crr in a loop to generate log messages for what it's actually testing. For this to work, pasta needs to forward two ports. We set a PORTS variable with the options for this, but never actually use it. The test works, because without the options we use automatic port forwarding.
Oops.
That makes the test more fragile than it needs to be, in a way that's not at all related to what we're actually trying to test. Avoid this possible point of failure by explicitly specifying the forwarding.
I encountered this because Fedora has now updated to a kernel with the /proc/net lseek() bug.
By the way, the fix is now in mainline as 2ce3d282bd50 ("proc: fix missing pde_set_flags() for net proc files"). I hoped the breakage would never reach distributions but I guess the timing was unlucky enough. -- Stefano
On Fri, Sep 05, 2025 at 01:03:40PM +0200, Stefano Brivio wrote:
On Fri, 5 Sep 2025 16:43:17 +1000 David Gibson
wrote: test/pasta_options/log_to_file uses tcp_crr in a loop to generate log messages for what it's actually testing. For this to work, pasta needs to forward two ports. We set a PORTS variable with the options for this, but never actually use it. The test works, because without the options we use automatic port forwarding.
Oops.
That makes the test more fragile than it needs to be, in a way that's not at all related to what we're actually trying to test. Avoid this possible point of failure by explicitly specifying the forwarding.
I encountered this because Fedora has now updated to a kernel with the /proc/net lseek() bug.
By the way, the fix is now in mainline as 2ce3d282bd50 ("proc: fix missing pde_set_flags() for net proc files"). I hoped the breakage would never reach distributions but I guess the timing was unlucky enough.
Apparently so. Oh well, good to know the fix is upstream. -- David Gibson (he or they) | 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
On Mon, Sep 08, 2025 at 11:53:58AM +1000, David Gibson wrote:
On Fri, Sep 05, 2025 at 01:03:40PM +0200, Stefano Brivio wrote:
On Fri, 5 Sep 2025 16:43:17 +1000 David Gibson
wrote: test/pasta_options/log_to_file uses tcp_crr in a loop to generate log messages for what it's actually testing. For this to work, pasta needs to forward two ports. We set a PORTS variable with the options for this, but never actually use it. The test works, because without the options we use automatic port forwarding.
Oops.
That makes the test more fragile than it needs to be, in a way that's not at all related to what we're actually trying to test. Avoid this possible point of failure by explicitly specifying the forwarding.
I encountered this because Fedora has now updated to a kernel with the /proc/net lseek() bug.
By the way, the fix is now in mainline as 2ce3d282bd50 ("proc: fix missing pde_set_flags() for net proc files"). I hoped the breakage would never reach distributions but I guess the timing was unlucky enough.
Apparently so. Oh well, good to know the fix is upstream.
Hmm... Fedora is still on 6.16.4, so possibly they explicitly backported the bad patch? Oops. -- David Gibson (he or they) | 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
On Fri, 5 Sep 2025 16:43:12 +1000
David Gibson
Here's a new approach to building passt tests with exeter. This new one no longer uses Avocado in the default case, although it would still be possible to manually run the exeter based tests with Avocado.
For now this only does simple tests, to show how the integration could work. It adds some new trivial "smoke tests" and converts the linter and build checks to exeter. More complex tests will require building the tunbridge library we've discussed. A lot of the work for that already exists in my earlier exeter test series, but it will need some rework to split it into a separate component.
v8: * Create video links for exeter tests too * Fix some bad indenting
Applied! -- Stefano
On Fri, Sep 05, 2025 at 01:03:44PM +0200, Stefano Brivio wrote:
On Fri, 5 Sep 2025 16:43:12 +1000 David Gibson
wrote: Here's a new approach to building passt tests with exeter. This new one no longer uses Avocado in the default case, although it would still be possible to manually run the exeter based tests with Avocado.
For now this only does simple tests, to show how the integration could work. It adds some new trivial "smoke tests" and converts the linter and build checks to exeter. More complex tests will require building the tunbridge library we've discussed. A lot of the work for that already exists in my earlier exeter test series, but it will need some rework to split it into a separate component.
v8: * Create video links for exeter tests too * Fix some bad indenting
Applied!
Yay! -- David Gibson (he or they) | 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
participants (2)
-
David Gibson
-
Stefano Brivio