Skip to content
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

t/core/*-single-reboot: extend to core20+, use sideload instead of refresh for robustness #13741

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Meulengracht
Copy link
Member

@Meulengracht Meulengracht commented Mar 21, 2024

Switch to a side-load approach where it's easier to control the update behaviour and use unasserted snaps on UC18 to provide consistent updates. Before sometimes the core18 base would not update due to same revision in the image and in edge. (And we could not update gadget/kernel with unasserted snaps as they were asserted in image). This also improved the complexity of the tests.

This does not touch the failover tests, i'll probably do a separate PR for those

@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.91%. Comparing base (5fa9b1b) to head (7b122ef).
Report is 7 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13741   +/-   ##
=======================================
  Coverage   78.90%   78.91%           
=======================================
  Files        1043     1043           
  Lines      134350   134349    -1     
=======================================
+ Hits       106013   106019    +6     
+ Misses      21723    21718    -5     
+ Partials     6614     6612    -2     
Flag Coverage Δ
unittests 78.91% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Meulengracht Meulengracht force-pushed the feature/improved-single-reboot-tests branch from 7b122ef to 255b098 Compare March 5, 2025 13:06
Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.11%. Comparing base (d6d95f0) to head (6abcc30).
Report is 38 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13741      +/-   ##
==========================================
+ Coverage   78.09%   78.11%   +0.02%     
==========================================
  Files        1190     1190              
  Lines      158458   159184     +726     
==========================================
+ Hits       123746   124353     +607     
- Misses      27017    27103      +86     
- Partials     7695     7728      +33     
Flag Coverage Δ
unittests 78.11% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

github-actions bot commented Mar 5, 2025

Fri Mar 21 16:31:16 UTC 2025
The following results are from: https://github.com/canonical/snapd/actions/runs/13993641963

Failures:

Preparing:

  • google-core:ubuntu-core-18-64:tests/main/interfaces-personal-files
  • google-core:ubuntu-core-24-64:tests/main/snap-user-dir-perms-fixed:test
  • google:ubuntu-20.04-64
  • google:ubuntu-20.04-64:tests/main/interfaces-pulseaudio
  • google:ubuntu-24.10-64:tests/main/apparmor-prompting-integration-tests:read_single_allow
  • google:ubuntu-24.04-64:tests/main/apparmor-prompting-integration-tests:create_multiple_actioned_by_other_pid_always_allow

Executing:

  • google-distro-1:debian-11-64:tests/main/snapshot-users
  • google-distro-1:debian-11-64:tests/main/snap-remove-terminate:fork_bomb
  • google-distro-1:debian-11-64:tests/main/document-portal-activation
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-single-reboot:gadget_noreboot
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_base
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-pair-single-reboot-failover:kernel_base
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-single-reboot:gadget_reboot
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_gadget
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-pair-single-reboot:gadget_base
  • google-core:ubuntu-core-18-64:tests/main/interfaces-mount-control
  • google-core:ubuntu-core-18-64:tests/main/base-migration:back
  • google-core:ubuntu-core-18-64:tests/main/snap-user-service
  • google-core:ubuntu-core-20-64:tests/main/snap-user-service-start-on-install
  • google-core:ubuntu-core-20-64:tests/main/snapshot-cross-revno
  • google-core:ubuntu-core-20-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_gadget
  • google-core:ubuntu-core-20-64:tests/smoke/install
  • google-core:ubuntu-core-24-64:tests/core/kernel-base-gadget-single-reboot:gadget_reboot
  • google-core:ubuntu-core-24-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_gadget
  • google-core:ubuntu-core-24-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_base
  • google-core:ubuntu-core-24-64:tests/core/kernel-base-gadget-single-reboot:gadget_noreboot
  • google:ubuntu-20.04-64:tests/main/lxd:snapd_cgroup_both
  • google:ubuntu-20.04-64:tests/main/auto-refresh-gating
  • google:ubuntu-20.04-64:tests/main/snap-remove-terminate:fork_bomb
  • google:ubuntu-20.04-64:tests/main/snap-confine-undesired-mode-group
  • google:ubuntu-20.04-64:tests/main/snap-user-service-restart-on-upgrade
  • google:ubuntu-20.04-64:tests/main/snapshot-cross-revno
  • google:ubuntu-20.04-64:tests/main/snap-user-service-enabled-after-install
  • google:ubuntu-20.04-64:tests/main/snap-routine-portal-info
  • google:ubuntu-20.04-64:tests/main/interfaces-desktop-launch
  • google:ubuntu-20.04-64:tests/main/install-errors:withreexec
  • google:ubuntu-24.04-64:tests/main/interfaces-requests-activates-handlers
  • google:ubuntu-24.04-64:tests/main/interfaces-userns
  • google:ubuntu-24.04-64:tests/main/non-home:var
  • google:ubuntu-24.04-64:tests/main/interfaces-personal-files
  • google:ubuntu-24.04-64:tests/main/snap-user-services-mixed-refresh-single-disabled
  • google:ubuntu-24.04-64:tests/main/prepare-image-uboot

Restoring:

  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-single-reboot:gadget_noreboot
  • google-core:ubuntu-core-18-64:tests/core/
  • google-core:ubuntu-core-18-64
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_base
  • google-core:ubuntu-core-18-64:tests/core/
  • google-core:ubuntu-core-18-64
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-single-reboot:gadget_reboot
  • google-core:ubuntu-core-18-64:tests/core/
  • google-core:ubuntu-core-18-64
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-pair-single-reboot:gadget_base
  • google-core:ubuntu-core-18-64:tests/core/
  • google-core:ubuntu-core-18-64
  • google-core:ubuntu-core-18-64:tests/main/ca-certs-for-snaps
  • google-core:ubuntu-core-18-64:tests/main/
  • google-core:ubuntu-core-18-64
  • google-core:ubuntu-core-18-64:tests/main/interfaces-personal-files
  • google-core:ubuntu-core-18-64:tests/main/
  • google-core:ubuntu-core-18-64
  • google-core:ubuntu-core-24-64:tests/main/snap-user-dir-perms-fixed:test
  • google-core:ubuntu-core-24-64:tests/core/kernel-base-gadget-single-reboot:gadget_reboot
  • google-core:ubuntu-core-24-64:tests/core/
  • google-core:ubuntu-core-24-64
  • google-core:ubuntu-core-24-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_gadget
  • google-core:ubuntu-core-24-64:tests/core/
  • google-core:ubuntu-core-24-64
  • google-core:ubuntu-core-24-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_base
  • google-core:ubuntu-core-24-64:tests/core/
  • google-core:ubuntu-core-24-64
  • google-core:ubuntu-core-24-64:tests/core/kernel-base-gadget-single-reboot:gadget_noreboot
  • google-core:ubuntu-core-24-64:tests/core/
  • google-core:ubuntu-core-24-64
  • google:ubuntu-24.10-64:tests/main/apparmor-prompting-integration-tests:read_single_allow
  • google:ubuntu-24.04-64:tests/main/apparmor-prompting-integration-tests:create_multiple_actioned_by_other_pid_always_allow

@Meulengracht Meulengracht force-pushed the feature/improved-single-reboot-tests branch 3 times, most recently from 14ca6f4 to 7e35b7c Compare March 17, 2025 07:56
@Meulengracht Meulengracht marked this pull request as ready for review March 17, 2025 07:58
@Meulengracht Meulengracht changed the title t/core/*-single-reboot-*: extend to core20+, use sideload instead of refresh for robustness t/core/*-single-reboot: extend to core20+, use sideload instead of refresh for robustness Mar 17, 2025
@Meulengracht Meulengracht reopened this Mar 17, 2025
@Meulengracht Meulengracht force-pushed the feature/improved-single-reboot-tests branch from 034c65f to 9412dcd Compare March 17, 2025 10:49
@Meulengracht Meulengracht reopened this Mar 18, 2025
snap download "$core_snap" --edge
unsquashfs -d base-snap "${core_snap}"_*.snap
rm "${core_snap}"_*
snap pack base-snap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only purpose of repacking is to make the snap unasserted? if so would eg prinft '\0' >> core-for-repack.snap be enough? it would change the checksum, but I think it should still be possible to use the snap file, at least my local experiments show that unsquashfs is happy extracting it and I can still mount it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants