diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2019-02-15 16:09:19 +0100 |
|---|---|---|
| committer | Michael Vogt <mvo@ubuntu.com> | 2019-02-15 18:58:29 +0100 |
| commit | 68d1326dcfc2634333b2e7a442694cf0eeb9beaa (patch) | |
| tree | 2943dd2d7c9e60583abcefffc61f882150fb0bc5 | |
| parent | 991b7b6424f07e19de8c993c12d332eb81d66d6c (diff) | |
tests: fix upgrade-from-2.15 with kernel 4.15fix-upgrade-test
snapd version 2.15 will not work with kernels newer than 4.4 because later kernels require snap-exec to be mmapable. This PR adds the missing rule manually.
| -rw-r--r-- | tests/main/upgrade-from-2.15/task.yaml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/main/upgrade-from-2.15/task.yaml b/tests/main/upgrade-from-2.15/task.yaml index 4fdcc7f3cf..cb4a270e88 100644 --- a/tests/main/upgrade-from-2.15/task.yaml +++ b/tests/main/upgrade-from-2.15/task.yaml @@ -5,6 +5,9 @@ systems: [ubuntu-16.04-64] prepare: | dpkg --purge snapd +restore: | + dpkg --purge ubuntu-core-launcher snap-confine + execute: | #shellcheck source=tests/lib/systemd.sh . "$TESTSLIB"/systemd.sh @@ -18,6 +21,16 @@ execute: | echo "install a service snap and check its active" snap install go-example-webserver + + # google ships 4.15 in (some?) of their cloud instances for 16.04 + if [[ "$(uname -r)" != 4.4.* ]]; then + # snapd version 2.15 will not work with kernels newer than + # 4.4 because later kernels require snap-exec to be mmapable + # add this missing rule here + sed -i 's#^}$#/usr/lib/snapd/snap-exec m,\n}#' /var/lib/snapd/apparmor/profiles/snap.go-example-webserver.webserver + apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.go-example-webserver.webserver + systemctl start snap.go-example-webserver.webserver + fi wait_for_service snap.go-example-webserver.webserver.service echo "upgrade to current snapd" |
