This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
TEST: swupd support and testing #318
Open
pohly
wants to merge
22
commits into
intel:master
Choose a base branch
from
pohly:swupd
base: master
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.
Open
Conversation
This file contains 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
test this please |
pohly
force-pushed
the
swupd
branch
3 times, most recently
from
October 12, 2017 06:26
ae2f822
to
16bb58e
Compare
pohly
force-pushed
the
swupd
branch
3 times, most recently
from
October 24, 2017 08:52
fe48360
to
96cf2cf
Compare
test this please |
2 similar comments
test this please |
test this please |
Not sure whether it has been broken all along, but at least with current OE-core master, systemd_create_users was still active because it gets added to ROOTFS_POSTPROCESS_COMMAND with a semicolon directly after the word. Removing it is still relevant because YOCTO #9789 remains unfixed. Signed-off-by: Patrick Ohly <[email protected]>
The code which created temporary image recipes was obsolete and had no effect anymore, because permanent image recipes had to be added instead (otherwise bitbake removed image artifacts when it saw that a recipe was gone), and those now have higher priority than then created ones. However, OSTREE_BRANCHNAME must be set in the permanent recipe, otherwise updating doesn't do anything. Signed-off-by: Patrick Ohly <[email protected]>
The part about running an update test with an HTTP server serving files is common to OSTree and swupd, so it makes sense to have that in a separate base class. Signed-off-by: Patrick Ohly <[email protected]>
Calling "bitbake -e" during class construction slows down all oe-selftest invocations, whether the result is needed or not, and happens before oe-selftest prints any output. It's better to trigger the call only when needed while still caching the result across all classes that need the information. Signed-off-by: Patrick Ohly <[email protected]>
modify_image_build() is run outside of bitbake and thus is better suited for SystemUpdateBase. Extending SystemUpdateModify is harder because it needs to be pickled. Signed-off-by: Patrick Ohly <[email protected]>
Modifying sshd_config only works when OpenSSH is installed, which is otherwise not needed for testing because commands are run via serial console. Using udev instead allows to use smaller test images. Signed-off-by: Patrick Ohly <[email protected]>
This is relevant for checking delta computation in update mechanisms that support that, like swupd. While at it, rewrite the code to use pathlib more consistently. Signed-off-by: Patrick Ohly <[email protected]>
Besides adding a new file, adding a new directory also tends to be an interesting special case. For example, swupd server relies a lot on hardlinking, which does not work for directories. Signed-off-by: Patrick Ohly <[email protected]>
Tests then can use that information to ensure that exactly the right HTTP requests were made by the client. Signed-off-by: Patrick Ohly <[email protected]>
Changing directories for SimpleHTTPRequestHandler has side effects like invoking bitbake in the repo directory, where bitbake then creates its bitbake-cookerdaemon.log file. That breaks testing randomly, depending on the timing of daemon startup/shutdown. We can continue to use SimpleHTTPRequestHandler without changing directories by tweaking its (internal?!) translate_path() implementation a bit. Signed-off-by: Patrick Ohly <[email protected]>
This can be used test the behavior when there are server-side errors. Signed-off-by: Patrick Ohly <[email protected]>
Much of the code relied on a running code in certain contexts. So far, that was solved via callbacks, which made reusing some subset of the functionality or parameterizing tests harder. Now the flow is broken up into individual steps, with context managers used whenever cleanup operations are needed. Signed-off-by: Patrick Ohly <[email protected]>
The range only included a single port, which was set this way when debugging the code. Now it's a proper range. The error resulting from not finding a free port was not reported properly: the revised class has no access to the unittest fail(), so now it just throws a RuntimeError. Signed-off-by: Patrick Ohly <[email protected]>
OE-core does not tell the initramfs to mount read-only when read-only-rootfs is set for an image. That looks like an oversight and (besides touching the filesystem by mounting it read/write for each boot) has the effect that systemd is modifying /etc/machine-id on first boot before making the filesystem read-only. This shows up in a "swupd verify" operation when using the active partition as source for the inactive partition. Signed-off-by: Patrick Ohly <[email protected]>
When using a read-only rootfs, files that normally would get modified at runtime (like /etc/machine-id) remain unchanged, so we do not need and shouldn't ignore them in the swupd update stream, because otherwise "swupd verify --extra-picky --fix" removes them. Signed-off-by: Patrick Ohly <[email protected]>
When using swupd and UEFI combo app, efi-combo-trigger is needed to copy the updated kernel from the rootfs to the EFI partition. Signed-off-by: Patrick Ohly <[email protected]>
Having the layer around will allow adding tests for the remaining swupd support and of the layer itself. Signed-off-by: Patrick Ohly <[email protected]>
Future maintenance of Yocto meta-swupd is still uncertain. For now let's experiment in a private fork on GitHub. Signed-off-by: Patrick Ohly <[email protected]>
This uses the same infrastructure as OSTree testing. However, updating the kernel was found to be buggy (efi_combo_updater fails) and content in /etc cannot be customized locally, so those tests get disabled. RefkitSwupdUpdateTestIncremental preserves the www directory while wiping out rest of the swupd directory. The tmpdir itself is kept unchanged, for performance reasons. A more realistic test would be to wipe out tmp, too, and thus rebuild entirely from sstate, but the is not done here due to the performance impact on testing. Image recipes which define swupd bundles go through different code paths for producing the rootfs (they need a mega image which is different from the core OS rootfs). In addition, additional images with bundles pre-installed can be created. Building refkit-image-update-swupd-bundles covers the additional code paths. Building refkit-image-update-swupd-bundles-dev tests producing an image with additional bundles. To keep build times low and cover additional caveats, artificial packages which add users in a postinst are used as bundle content. Signed-off-by: Patrick Ohly <[email protected]>
RefkitSwupdUpdateTestAll currently contains a single test which covers various live updating. RefkitSwupdUpdateTestIncremental simulates a CI setup where each build starts without a local swupd repo. RefkitSwupdPartitionTest covers swupd-update-partition. Signed-off-by: Patrick Ohly <[email protected]>
The test is failing only in the CI, so run it immediately to speed up debugging. Signed-off-by: Patrick Ohly <[email protected]>
librealsense has rebased their master branch, leading to: "Unable to find revision 7332ecadc057552c178addd577d24a2756f8789a in branch master even from upstream". This is a hotfix until meta-intel-realsense gets updated. Signed-off-by: Patrick Ohly <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We are investigating supporting swupd again. This is a test PR using
an experimental fork of meta-swupd.