[PATCH v7 0/4] 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. 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 (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 | 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 | 57 ++++++++++++++++++ test/run | 18 ++++-- test/smoke/smoke.sh | 33 ++++++++++ 10 files changed, 261 insertions(+), 103 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
On Thu, 4 Sep 2025 12:50:00 +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.
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.
I was about to apply this, but then realised that the usual build test links at https://passt.top/#ci disappeared, see also https://passt.top/builds/latest/web/ci.js. I didn't really investigate yet, we're missing something equivalent to the "test" directive. If I recall correctly, that was working in v5, but I'm not sure why. I still need to look into this, unless you figure it out meanwhile. Something minor I noticed is that indentation of some lines in run_selected() is broken now (spaces instead of tabs). -- Stefano
On Fri, Sep 05, 2025 at 01:14:33AM +0200, Stefano Brivio wrote:
On Thu, 4 Sep 2025 12:50:00 +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.
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.
I was about to apply this, but then realised that the usual build test links at https://passt.top/#ci disappeared, see also https://passt.top/builds/latest/web/ci.js.
Huh, that's weird.
I didn't really investigate yet, we're missing something equivalent to the "test" directive.
We shouldn't be. exeter() calls status_test_{start,ok,fail} much like test().
If I recall correctly, that was working in v5, but I'm not sure why. I still need to look into this, unless you figure it out meanwhile.
Right, you said v5 worked. Hrm.... one of the main differences since v5 is getting the descriptions, which *are* used as the parameter to status_test_start. Could the descriptions be using some character we weren't before and we're missing an escape somewhere? Not seeing an obvious spot.
Something minor I noticed is that indentation of some lines in run_selected() is broken now (spaces instead of tabs).
Drat, I thought I fixed my editor config for that. I've fixed it in my branch, I'll hold of on another spin until we figure out what's going on with the CI links. -- 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, Sep 05, 2025 at 11:35:53AM +1000, David Gibson wrote:
On Fri, Sep 05, 2025 at 01:14:33AM +0200, Stefano Brivio wrote:
On Thu, 4 Sep 2025 12:50:00 +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.
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.
I was about to apply this, but then realised that the usual build test links at https://passt.top/#ci disappeared, see also https://passt.top/builds/latest/web/ci.js.
Huh, that's weird.
I didn't really investigate yet, we're missing something equivalent to the "test" directive.
We shouldn't be. exeter() calls status_test_{start,ok,fail} much like test().
Ah.. but I didn't call video_link, like test_one() did. Which explains why the new tests weren't getting links... but not why it broke the existing ones. Well, I've put that in, and ci.js looks sane to me, but I don't really know how that video stuff works. I'll send v8.
If I recall correctly, that was working in v5, but I'm not sure why. I still need to look into this, unless you figure it out meanwhile.
Right, you said v5 worked. Hrm.... one of the main differences since v5 is getting the descriptions, which *are* used as the parameter to status_test_start. Could the descriptions be using some character we weren't before and we're missing an escape somewhere? Not seeing an obvious spot.
Something minor I noticed is that indentation of some lines in run_selected() is broken now (spaces instead of tabs).
Drat, I thought I fixed my editor config for that. I've fixed it in my branch, I'll hold of on another spin until we figure out what's going on with the CI links.
-- 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
-- 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:42:58 +1000
David Gibson
On Fri, Sep 05, 2025 at 11:35:53AM +1000, David Gibson wrote:
On Fri, Sep 05, 2025 at 01:14:33AM +0200, Stefano Brivio wrote:
On Thu, 4 Sep 2025 12:50:00 +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.
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.
I was about to apply this, but then realised that the usual build test links at https://passt.top/#ci disappeared, see also https://passt.top/builds/latest/web/ci.js.
Huh, that's weird.
I didn't really investigate yet, we're missing something equivalent to the "test" directive.
We shouldn't be. exeter() calls status_test_{start,ok,fail} much like test().
Ah.. but I didn't call video_link, like test_one() did. Which explains why the new tests weren't getting links... but not why it broke the existing ones.
No, no, existing ones are fine. Just the *build* test links were missing. It all works now (with v8).
Well, I've put that in, and ci.js looks sane to me, but I don't really know how that video stuff works. I'll send v8.
It's write-only code but it's conceptually simple: we record the start timestamp (based on /proc/uptime) of each test file and add that, together with a key, to a JavaScript array, video_cilinks. One 'a' HTML element (link) is also generated for each test file, with an 'id' attribute matching that key, and when you click on that link, a listener will look into video_cilink and use the matching start timestamp as seek time for AsciinemaPlayer.
If I recall correctly, that was working in v5, but I'm not sure why. I still need to look into this, unless you figure it out meanwhile.
Right, you said v5 worked. Hrm.... one of the main differences since v5 is getting the descriptions, which *are* used as the parameter to status_test_start. Could the descriptions be using some character we weren't before and we're missing an escape somewhere? Not seeing an obvious spot.
I guess I didn't actually recall correctly, or didn't check those links, because it couldn't have worked in v5 either. -- Stefano
participants (2)
-
David Gibson
-
Stefano Brivio