tests: cancel the scheduled reboot on ubuntu-core-upgrade-no-gc and restore state #2516

Merged
merged 4 commits into from Dec 23, 2016

Conversation

Projects
None yet
2 participants
Contributor

fgimenez commented Dec 19, 2016

We were getting sporadic reboots during test executions on the boards that made tests fail with EOF in the best cases, render the device unbootable in the worst, depending on the time in which the reboot was taking place.

The tests/main/ubuntu-core-upgrade-no-gc test sideloads the core snap 5 times and on restore it was only updating the core symlink, with these changes the snap_try_core boot env var is unset and the reboot is canceled.

fgimenez added some commits Dec 19, 2016

zyga approved these changes Dec 23, 2016

LGTM with one tweak

tests/lib/boot.sh
+ if command -v grub-editenv >/dev/null; then
+ grub-editenv /boot/grub/grubenv unset "$1"
+ else
+ fw_setenv "$1"
@zyga

zyga Dec 23, 2016

Contributor

Can you please add a comment .e.g.

 # bootenv_unset VAR
 # unset VAR from boot configuration
@fgimenez

fgimenez Dec 23, 2016

Contributor

@zyga done, thanks a lot! :)

fgimenez added some commits Dec 23, 2016

zyga approved these changes Dec 23, 2016

LGTM

@zyga zyga merged commit 9a7e8ca into snapcore:master Dec 23, 2016

6 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
xenial-amd64 autopkgtest finished (success)
Details
xenial-i386 autopkgtest finished (success)
Details
xenial-ppc64el autopkgtest finished (success)
Details
yakkety-amd64 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment