Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
tests: add core revert test #3348
Conversation
fgimenez
added some commits
May 18, 2017
codecov-io
commented
May 18, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #3348 +/- ##
==========================================
+ Coverage 77.55% 77.55% +<.01%
==========================================
Files 371 371
Lines 25519 25519
==========================================
+ Hits 19790 19792 +2
+ Misses 3978 3976 -2
Partials 1751 1751
Continue to review full report at Codecov.
|
fgimenez
added some commits
May 18, 2017
|
The test case finally reproduces the seccomp issue, with the current status and executed setting @niemeyer if you could take a look that would be great |
mvo5
approved these changes
May 29, 2017
Looks good, one (most unrelated for the core of this PR) comment about trap
| + # create ubuntu-core image | ||
| + mkdir -p /tmp/work-dir | ||
| + snap install --devmode --beta ubuntu-image | ||
| + trap 'snap remove ubuntu-image' EXIT |
mvo5
May 29, 2017
Collaborator
Trap will replace other existing traps on the same signal. So if we alread use a trap ... EXIT anwhere this is overriden now. We may consider switching to a helper (add_trap) that stacks the cleanups if we already use traps. Probably material for a new PR though.
fgimenez
May 29, 2017
Contributor
Thanks @mvo5 ! Indeed, for the time being, and given that all the tasks in the nested suite are going to use ubuntu-image, I've moved its install/unistall at the suite level, and btw also removed a trap used for apt, please take another look.
mvo5
referenced this pull request
May 29, 2017
Merged
interfaces: disable "mknod |N" in the default seccomp template again #3397
fgimenez
added some commits
May 29, 2017
mvo5
referenced this pull request
May 29, 2017
Closed
interfaces: move seecomp profiles to /var/lib/snapd/seccomp/profiles-v2/ #3407
fgimenez
added some commits
May 30, 2017
mvo5
merged commit 8742e4c
into
snapcore:master
Jun 8, 2017
6 of 7 checks passed
| + QEMU="$(which qemu-system-x86_64)" | ||
| + ;; | ||
| + i386) | ||
| + QEMU="$(which qemu-system-i386)" |
zyga
Jun 8, 2017
Contributor
QEMU can expand to "". This is not a big deal but I'd rather get a qemu-system-x86_64: command not found than a more confusing message below when the first argument of qemu becomes the command. Could we please drop the which?
| + esac | ||
| + | ||
| + # create ubuntu-core image | ||
| + mkdir -p /tmp/work-dir |
| @@ -0,0 +1,28 @@ | ||
| +summary: core revert test |
| @@ -0,0 +1,28 @@ | ||
| +summary: core revert test | ||
| + | ||
| +systems: [ubuntu-16.04-64] |
fgimenez
Jun 8, 2017
Contributor
I think so, in fact the interesting part happens on the nested machine, if we can install qemu all should be good. I'll try locally with debian/fedora anyway.
fgimenez commentedMay 18, 2017
•
Edited 1 time
-
fgimenez
May 24, 2017
This test exercises a core revert on a nested ubuntu-core system, currently only a preinstalled snap is set (network-manager) and the check after the revert only takes into account network configuration. It can be executed with:
SPREAD_CORE_CHANNEL=stable spread -v qemu:ubuntu-16.04-64:tests/nested/core-revert.This PR also includes a refactor of reusable functions from a previous nested task, the actual test is https://github.com/snapcore/snapd/pull/3348/files#diff-4825fd024a235e7895b109ad37072e68