Skip to content

Commit

Permalink
tests: fix spread test failures on 18.04
Browse files Browse the repository at this point in the history
This is important so that we get clean autopkgtest results for the
2.31 release in ubuntu 18.04 (and below).
  • Loading branch information
mvo5 committed Feb 12, 2018
1 parent 74843c1 commit 116d3cb
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
3 changes: 3 additions & 0 deletions interfaces/apparmor/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ profile "snap.samba.smbd" (attach_disconnected) {
# This is related to LP: #1666897
@{INSTALL_DIR}/core/*/{,usr/}lib/@{multiarch}/{,**/}lib*.so* m,
# Read only access to the core snap-exec (needed on bionic)
@{INSTALL_DIR}/core/*/usr/lib/snapd/snap-exec m,
snippet
}
`,
Expand Down
3 changes: 3 additions & 0 deletions interfaces/apparmor/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ var classicJailmodeSnippet = `
# Read only access to the core snap to load libc from.
# This is related to LP: #1666897
@{INSTALL_DIR}/core/*/{,usr/}lib/@{multiarch}/{,**/}lib*.so* m,
# Read only access to the core snap-exec (needed on bionic)
@{INSTALL_DIR}/core/*/usr/lib/snapd/snap-exec m,
`

// nfsSnippet contains extra permissions necessary for snaps and snap-confine
Expand Down
7 changes: 7 additions & 0 deletions interfaces/builtin/time_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ dbus (receive)
member=PropertiesChanged
peer=(label=unconfined),
# Required in bionic (Ubuntu 18.04)
dbus (send)
bus=system
path=/org/freedesktop/timedate1
interface=org.freedesktop.DBus.Properties
member=GetAll,
# As the core snap ships the timedatectl utility we can also allow
# clients to use it now that they have access to the relevant
# D-Bus methods for setting the time via timedatectl's set-time and
Expand Down
2 changes: 1 addition & 1 deletion mdlint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# see http://daringfireball.net/projects/markdown/syntax
# for the "canonical" reference
Expand Down
7 changes: 6 additions & 1 deletion tests/main/interfaces-timeserver-control/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
summary: Check that timeserver interface works

# This makes only sense on ubuntu-core because this snap will run inside
# the core environment on a classic system we cannot really use this
# on classic
systems: [ubuntu-core-*]

details: |
This test makes sure that a snap using the timeserver-control interface
can access timeserver information and update it.
Expand All @@ -12,7 +17,7 @@ prepare: |
restore: |
# Restore the initial timeserver
if [ -f timeserver.txt ]; then
if [ -s timeserver.txt ]; then
timedatectl set-ntp "$(cat timeserver.txt)"
rm -f timeserver.txt
fi
Expand Down
5 changes: 5 additions & 0 deletions tests/main/interfaces-timezone-control/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
summary: Check that timezone interface works

# This makes only sense on ubuntu-core because this snap will run inside
# the core environment on a classic system we cannot really use this
# on classic
systems: [ubuntu-core-*]

details: |
This test makes sure that a snap using the timezone-control interface
can access timezone information and update it.
Expand Down

0 comments on commit 116d3cb

Please sign in to comment.