Skip to content

Commit

Permalink
tests: add reproducer for lp 1871591
Browse files Browse the repository at this point in the history
The test is comprised of a core18-based app with two layout items for
/etc/foo file bind-mounts, several interfaces and two hooks. So far it
does not reproduce the issue.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
  • Loading branch information
zyga committed Apr 8, 2020
1 parent 6561a24 commit fd7033d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/regression/lp-1871591/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
summary: regression test for UNKNOWN
prepare: |
snap pack test-snapd-app
snap install --dangerous test-snapd-app_1_all.snap
execute: |
test-snapd-app.sh -c true
snap install --dangerous test-snapd-app_1_all.snap
test-snapd-app.sh -c true
debug: |
snap remove test-snapd-app
3 changes: 3 additions & 0 deletions tests/regression/lp-1871591/test-snapd-app/bin/sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
PS1='$ '
exec /bin/sh "$@"
2 changes: 2 additions & 0 deletions tests/regression/lp-1871591/test-snapd-app/meta/hooks/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
echo "hook: $0 $*" >>$SNAP_COMMON/hook.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
echo "hook: $0 $*" >>$SNAP_COMMON/hook.log
18 changes: 18 additions & 0 deletions tests/regression/lp-1871591/test-snapd-app/meta/snap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: test-snapd-app
version: 1
architectures: [all]
base: core18
confinement: strict
layout:
/etc/mke2fs.conf:
bind-file: $SNAP_COMMON/etc/mke2fs.conf
/etc/mtools.conf:
bind-file: $SNAP_COMMON/etc/mtools.conf
apps:
sh:
command: bin/sh
plugs:
- home
- mount-observe
- network-observe
- ssh-public-keys

0 comments on commit fd7033d

Please sign in to comment.