[PATCH v5 0/4] RFC: New proof-of-concept based exeter tests
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. Here's another draft of my work on testing passt with Avocado and the exeter library I recently created. It includes Cleber's patch adding some basic Avocado tests and builds on that. 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 sinte/pesto 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. 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 (4): 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/.gitignore | 2 + test/Makefile | 22 ++++++- test/build/all | 61 ------------------- test/build/build.py | 109 ++++++++++++++++++++++++++++++++++ test/build/clang_tidy | 17 ------ test/build/cppcheck | 17 ------ test/build/static_checkers.sh | 30 ++++++++++ test/lib/exeter | 56 +++++++++++++++++ test/run | 18 ++++-- test/smoke/smoke.sh | 27 +++++++++ 10 files changed, 257 insertions(+), 102 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.50.1
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
On Wed, 20 Aug 2025 20:54:52 +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.
Here's another draft of my work on testing passt with Avocado and the exeter library I recently created. It includes Cleber's patch adding some basic Avocado tests and builds on that.
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 sinte/pesto 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.
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"
This works on my setup and looks good to me, I just have two comments: - test names are still the same as before (not exactly descriptive, say, 'make_passt'). I already reported this on v4, I'm not sure what was your conclusion about it - I didn't check (yet) what happens when I run this as ./ci (for example, from the pre-push hook), if generated web links are still okay. I'll do that soon unless you can have a look first -- Stefano
On Wed, Aug 20, 2025 at 10:40:48PM +0200, Stefano Brivio wrote:
On Wed, 20 Aug 2025 20:54:52 +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.
Here's another draft of my work on testing passt with Avocado and the exeter library I recently created. It includes Cleber's patch adding some basic Avocado tests and builds on that.
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 sinte/pesto 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.
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"
This works on my setup and looks good to me, I just have two comments:
- test names are still the same as before (not exactly descriptive, say, 'make_passt'). I already reported this on v4, I'm not sure what was your conclusion about it
Sorry, I missed that comment on v4. exeter test ids are by design machine-friendly identifiers more than they are human-friendly names or descriptions. There are a few reasons for that: * The ids need to be passed around between test and runner both on the command line and via stdio. Limiting them to characters that are identifier friendly in most languages significantly reduces the chances of screwing up quoting. * In some existing Python cases, and maybe more language cases in future, the ids are auto-generated, e.g. for a matrix or composition of tests. That works more naturally for identifiers than names/descriptions. * Identifiers are more amenable to structured formatting grouping related tests together, which is useful for filtering out groups of test by glob/regexp. * I like having a succinct id to refer to tests by rather than a waffly English description I'm not opposed to having an (optional) human-readable name or description for tests in addition to the id. It would complexify the exeter protocol, of course, which I'm trying to keep super simple. Then again, I have several other things in mind that would need per-test metadata, so it's probably is worth it.
- I didn't check (yet) what happens when I run this as ./ci (for example, from the pre-push hook), if generated web links are still okay. I'll do that soon unless you can have a look first
I don't really know how to check that. I don't think there's any reason it wouldn't work. -- 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 Thu, 21 Aug 2025 12:48:27 +1000
David Gibson
On Wed, Aug 20, 2025 at 10:40:48PM +0200, Stefano Brivio wrote:
On Wed, 20 Aug 2025 20:54:52 +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.
Here's another draft of my work on testing passt with Avocado and the exeter library I recently created. It includes Cleber's patch adding some basic Avocado tests and builds on that.
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 sinte/pesto 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.
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"
This works on my setup and looks good to me, I just have two comments:
- test names are still the same as before (not exactly descriptive, say, 'make_passt'). I already reported this on v4, I'm not sure what was your conclusion about it
Sorry, I missed that comment on v4.
exeter test ids are by design machine-friendly identifiers more than they are human-friendly names or descriptions. There are a few reasons for that:
* The ids need to be passed around between test and runner both on the command line and via stdio. Limiting them to characters that are identifier friendly in most languages significantly reduces the chances of screwing up quoting.
* In some existing Python cases, and maybe more language cases in future, the ids are auto-generated, e.g. for a matrix or composition of tests. That works more naturally for identifiers than names/descriptions.
* Identifiers are more amenable to structured formatting grouping related tests together, which is useful for filtering out groups of test by glob/regexp.
It looks perhaps a bit awkward to filter Bats-based pasta tests from Podman with, say, -f TCP, but I actually find it convenient. The test name is human-friendly, and regexps are still easy.
* I like having a succinct id to refer to tests by rather than a waffly English description
I'm not opposed to having an (optional) human-readable name or description for tests in addition to the id. It would complexify the exeter protocol, of course, which I'm trying to keep super simple.
...but yes, I see. On the other hand, let's pick something like: TCP/IPv4: host to ns (spliced): big transfer would you call that... tcp_v4_host_to_ns_spliced_big? To me that would look like an obvious regression. It's very hard on eyes, and much less informative to newcomers (unless you add "transfer", but then it gets quite long for a machine-friendly identifier). And we'll surely run into something worse than that...
Then again, I have several other things in mind that would need per-test metadata, so it's probably is worth it.
I guess we might even want to have some attributes to categorise tests, eventually. I'm rather clueless as to the amount of complexity it adds, but it sounds like an obvious choice to me.
- I didn't check (yet) what happens when I run this as ./ci (for example, from the pre-push hook), if generated web links are still okay. I'll do that soon unless you can have a look first
I don't really know how to check that. I don't think there's any reason it wouldn't work.
Run as ./ci, check that video_link_* links in web/ci.js make kind of sense. Anyway, never mind, I just checked, they still work. -- Stefano
On Thu, Aug 21, 2025 at 11:27:02PM +0200, Stefano Brivio wrote:
On Thu, 21 Aug 2025 12:48:27 +1000 David Gibson
wrote: On Wed, Aug 20, 2025 at 10:40:48PM +0200, Stefano Brivio wrote:
On Wed, 20 Aug 2025 20:54:52 +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.
Here's another draft of my work on testing passt with Avocado and the exeter library I recently created. It includes Cleber's patch adding some basic Avocado tests and builds on that.
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 sinte/pesto 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.
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"
This works on my setup and looks good to me, I just have two comments:
- test names are still the same as before (not exactly descriptive, say, 'make_passt'). I already reported this on v4, I'm not sure what was your conclusion about it
Sorry, I missed that comment on v4.
exeter test ids are by design machine-friendly identifiers more than they are human-friendly names or descriptions. There are a few reasons for that:
* The ids need to be passed around between test and runner both on the command line and via stdio. Limiting them to characters that are identifier friendly in most languages significantly reduces the chances of screwing up quoting.
* In some existing Python cases, and maybe more language cases in future, the ids are auto-generated, e.g. for a matrix or composition of tests. That works more naturally for identifiers than names/descriptions.
* Identifiers are more amenable to structured formatting grouping related tests together, which is useful for filtering out groups of test by glob/regexp.
It looks perhaps a bit awkward to filter Bats-based pasta tests from Podman with, say, -f TCP, but I actually find it convenient. The test name is human-friendly, and regexps are still easy.
Point taken. Consider human-readable names descriptions bumped several notches up my priority table (and at least the basics of metadata support with it).
* I like having a succinct id to refer to tests by rather than a waffly English description
I'm not opposed to having an (optional) human-readable name or description for tests in addition to the id. It would complexify the exeter protocol, of course, which I'm trying to keep super simple.
...but yes, I see. On the other hand, let's pick something like:
TCP/IPv4: host to ns (spliced): big transfer
would you call that... tcp_v4_host_to_ns_spliced_big? To me that would look like an obvious regression.
More likely I'd be looking at a name based on the grouping / structure, maybe 'host_to_splice;tcp4_xfer_big'. Which makes sense from the point of view of constructing those tests from compositions of pieces (which should be possible for that case), but is even more of a readability regression.
It's very hard on eyes, and much less informative to newcomers (unless you add "transfer", but then it gets quite long for a machine-friendly identifier).
And we'll surely run into something worse than that...
Then again, I have several other things in mind that would need per-test metadata, so it's probably is worth it.
I guess we might even want to have some attributes to categorise tests, eventually. I'm rather clueless as to the amount of complexity it adds, but it sounds like an obvious choice to me.
Right. 'tags' of this type are a very common feature for test runners. Again, this is primarily just a matter of devising a means of exposing the metadata. The only thing that makes that tricky is the fact that every exeter implementation needs to do it, so it's important to design it so as to keep the implementation complexity to an absolute minimum.
- I didn't check (yet) what happens when I run this as ./ci (for example, from the pre-push hook), if generated web links are still okay. I'll do that soon unless you can have a look first
I don't really know how to check that. I don't think there's any reason it wouldn't work.
Run as ./ci, check that video_link_* links in web/ci.js make kind of sense. Anyway, never mind, I just checked, they still work.
I'm not sure I know enough about those videos or js to know what makes sense. Anyway, thanks for checking it. -- 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