tests: add new kernel refresh/revert test for spread-cron #4063

Open
wants to merge 9 commits into
from

Conversation

Projects
None yet
6 participants
Collaborator

mvo5 commented Oct 20, 2017

This test ensures that we can go from stable->edge for pc-kernel
on core devices. It also tests revert.

This will also need to go into spread-cron and we need to set it to manual. The manual: true setting is commented out so that the test runs here once in travis before it is moved to spread-cron.

tests: add new kernel refresh/revert test for spread-cron
This test ensures that we can go from stable->edge for pc-kernel
on core devices. It also tests revert.

codecov-io commented Oct 20, 2017

Codecov Report

Merging #4063 into master will increase coverage by 2.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4063      +/-   ##
==========================================
+ Coverage   75.95%   78.03%   +2.07%     
==========================================
  Files         440      449       +9     
  Lines       38427    30907    -7520     
==========================================
- Hits        29188    24118    -5070     
+ Misses       7225     4776    -2449     
+ Partials     2014     2013       -1
Impacted Files Coverage Δ
client/packages.go 61.42% <0%> (-8.85%) ⬇️
cmd/snap-repair/cmd_list.go 80% <0%> (-7.18%) ⬇️
cmd/snap-repair/trusted.go 66.66% <0%> (-4.77%) ⬇️
polkit/pid_start_time.go 66.66% <0%> (-4.31%) ⬇️
cmd/snap-update-ns/freezer.go 52.17% <0%> (-4.08%) ⬇️
asserts/sysdb/trusted.go 68% <0%> (-4%) ⬇️
snap/snaptest/snaptest.go 46.87% <0%> (-3.78%) ⬇️
release/uname_linux.go 71.42% <0%> (-3.58%) ⬇️
interfaces/mount/entry.go 63.93% <0%> (-3.48%) ⬇️
cmd/snap/notes.go 76.05% <0%> (-2.9%) ⬇️
... and 382 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0a9e57...5ad7592. Read the comment docs.

Very nice! Two comments for your consideration before merging.

+ NEW_KERNEL_CHANNEL: edge
+
+restore: |
+ rm -f prevBoot nextBoot
@stolowski

stolowski Oct 25, 2017

Contributor

We should probably also remove prevKernelSignature and nextKernelSignature?

+ snap install test-snapd-tools
+
+execute: |
+ wait_core_post_boot() {
@stolowski

stolowski Oct 25, 2017

Contributor

Is it worth moving to boot.sh? Any chance it's going to be useful for other tests?

@mvo5

mvo5 Oct 26, 2017

Collaborator

A good question, I have a look at the other boot related tests

mvo5 added some commits Oct 20, 2017

tests: add new kernel refresh/revert test for spread-cron
This test ensures that we can go from stable->edge for pc-kernel
on core devices. It also tests revert.

+0.99, two comments to consider before merging

+ snap install pc-kernel --${KERNEL_CHANNEL}
+ REBOOT
+ elif [ "$SPREAD_REBOOT" = 1 ]; then
+ # from our good starting place we refresh
@zyga

zyga Oct 30, 2017

Contributor

Space seems off here.

+
+ if diff -u prevKernelSignature nextKernelSignature; then
+ echo "kernel in edge / stable are the same"
+ exit 1
@zyga

zyga Oct 30, 2017

Contributor

Should this be an exit 1? Can we somehow skip the test. I worry that this will cause failures in the field at the wost possible moment sometime in the future, when we want to release.

zyga approved these changes Nov 8, 2017

LGTM, thank you for addressing feedback!

@mvo5 the test failure looks real.

Contributor

pedronis commented Nov 9, 2017

yep, test seems to be failing

mvo5 added some commits Nov 17, 2017

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