tests: add snap version invariant during restore phase of testing - #16465
tests: add snap version invariant during restore phase of testing#16465maykathm wants to merge 9 commits into
Conversation
|
Mon Jun 15 18:58:44 UTC 2026 Failures:Preparing:
Executing:
Restoring:
Skipped tests from snapd-testing-skipIf you wish to have any of the below tests run in your PR, in your PR description, add 'unskip:' followed by a copy-and-pasted list (without variants) of the below tests you wish to run (unskip plus test list must be valid yaml)
|
24a3f30 to
7e18134
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16465 +/- ##
==========================================
+ Coverage 79.07% 79.13% +0.05%
==========================================
Files 1370 1388 +18
Lines 190982 193529 +2547
Branches 2465 2466 +1
==========================================
+ Hits 151028 153149 +2121
- Misses 30864 31189 +325
- Partials 9090 9191 +101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f0467d1 to
10245b2
Compare
a28b5ab to
6db1093
Compare
6db1093 to
9570b76
Compare
3f919fc to
dac158b
Compare
dac158b to
98e617f
Compare
f106dd5 to
a6b7b7b
Compare
87de7b4 to
8ba5d3a
Compare
miguelpires
left a comment
There was a problem hiding this comment.
there's a duplicate check
Co-authored-by: Miguel Pires <miguelpires94@gmail.com>
| # The snapd version will not be a testing version | ||
| return 0 | ||
| fi | ||
| snap version | grep snapd | MATCH "1337" || { |
There was a problem hiding this comment.
this isn't exactly the version the test started with. I'd expect something like we do for the check-snap-mount-dir, i.e. record what's at the beginning of the test suite where we install the right package (sru, or a CI build) and check at the end that the version is still the same.
There was a problem hiding this comment.
That was my first approach but with that approach the cross-distro-reexec suite fails on amazon so I opted for this approach.
| if tests.info is-snapd-from-archive && not tests.info is-reexec-enabled; then | ||
| # re-exec may be explicitly disabled in the test variant, in which case the version will not match | ||
| return 0 | ||
| fi |
There was a problem hiding this comment.
do we still need this branch?
There was a problem hiding this comment.
Yes, because some tests disable re-exec
| tests.cleanup defer rm -f /snap | ||
| ;; | ||
| esac | ||
| if ! os.query is-amazon-linux; then |
There was a problem hiding this comment.
why is this needed for this change?
There was a problem hiding this comment.
Amazon should have the cleanup in its packaging so this is a correction. It's needed for this change because without it during cleanup in the cross-distro-reexec suite when the /snap dir is removed, snapd from the RPM package is used instead of the snap.
|
This change still has issues. Eventually with enough reruns the test pass, but I see |
No description provided.