-
Notifications
You must be signed in to change notification settings - Fork 60
Add remodel tests for Ubuntu Core 20 => 22 and 22 => 24 (New) #1858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Meulengracht
wants to merge
7
commits into
canonical:main
Choose a base branch
from
Meulengracht:tests/uc-remodel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hook25
requested changes
Apr 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I would change a few of the following points (see review) but the two biggest one I didnt note everywhere are:
- we package the base provider for all platforms, we validate it on all platforms so we can't use non-python 3.5 apis. This includes fstrings as our CI is screaming. You will have to change that.
- run doesn't check if the command didnt blow up, use check_call instead (else you will get a failing command followed by a bunch of also failing command, making the log unreadable)
…and improve templates, fix test-plan usage
…ve the secondary checkup, it was uselesss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Introduce two new tests, one specifically for Ubuntu Core 20 that verifies the possibility of remodeling to Ubuntu Core 22, and one identical one for Ubuntu Core 22 that remodels to 24.
The tests are implemented with the assumption that the Ubuntu Core images used by certifications use the official models sourced from either cdimage (which use models from https://github.com/canonical/models) or they are built by certifications themself from the mentioned models.
There are currently a lot of limitations on how remodel works, which means that the models must match brand / model if done offline or the device must have a serial assertion (as offline remodels cannot be done from model to a new model, only upgrades and we do not have official models for that currently).
If we end in a situation where the remodeling has to be done offline, we must discuss how we solve this for certification testing. Because if things don't line up currently, then we simply cannot test remodelling in certifications without either a new set of models specifically for this, or we have to lax some of the requirements for remodeling (i.e. implement/support some missing cases).
It's important to be aware of the fact that these test cause the device to reboot multiple times.
Resolved issues
I don't know if there is a issue for covering this specific area of testing.
Documentation
Depending on the test-plan they get added to, we may have to update the coverage in https://certification.canonical.com/docs/programmes/iot/ ?
Tests
These tests have been tested in qemu for amd64 platform and on a Raspberry Pi4 for pi-arm64 platform, by installing my own custom checkbox frontend containing the two added tests, then run with the following commands:
and
The python script was tested before it was tested in a snapped checkbox context by running it from the users home directory with the parameters in the tests.