DLPX-87572 sdb: want live kernel tests to find kernel regressions early
= Problem
With our switch to the new v5.15 kernel a subset of SDB commands broke without us realizing until we actually needed them. Our regression dumps helps us to ensure we don't introduce regressions for older kernels when developing new features but they can't help us in detecting changes in the upstream kernel or ZFS that break our commands.
= This Patch
This patch attempts to provide a rudimentary mechanism for catching regression introduced by the upstream Ubuntu kernels by running a few basic SDB commands in a Github action that's run nightly and for every PR.
Specifically this patch makes it so we have such a test for each Ubuntu LTS kernel starting from 20.04 (currently the ubuntu-latest Github runner tag points to 22.04 so we'd test that twice but in the future that tag will point to 24.04, etc...).
We also change for all the available Python versions for each Ubuntu version to further ensure SDB's compatibility with future Python versions.
= Misc Notes
In order to use SDB in the Github runner I had to introduce an extra script that downloads the kernel's debug info. See the install-live-kernel-dbg.sh script for more info.
I also made sure to decouple the apt-install of the python-dev files to its own shell script too as different Ubuntu versions ship with different Python versions. See install-python-dev.sh for more info.
= Potential Future Items
In the future we may want to detect whenever our ZFS commands are not getting out of date. test_live_kernel.sh has a way of detecting whether the ZFS module is installed and running a few ZFS commands on the live kernel. The idea is that we can either introduce Github Actions like the upstream openzfs that install our kernel module to the runner and run the commands there OR we can create a BlackBox test that clones the repo and runs this script.
Codecov Report
Merging #337 (bae4146) into develop (3a1fadc) will increase coverage by
0.03%. The diff coverage is100.00%.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@ Coverage Diff @@
## develop #337 +/- ##
===========================================
+ Coverage 85.18% 85.21% +0.03%
===========================================
Files 67 67
Lines 3077 3070 -7
===========================================
- Hits 2621 2616 -5
+ Misses 456 454 -2
| Files Changed | Coverage Δ | |
|---|---|---|
| sdb/commands/linux/threads.py | 96.55% <ø> (ø) |
|
| sdb/commands/linux/stacks.py | 95.42% <100.00%> (+1.04%) |
:arrow_up: |