github.com/kubiko/snapd@v0.0.0-20201013125620-d4f3094d9ddf/cmd/snap-confine/spread-tests/main/mount-profiles-mount-tmpfs/task.yaml (about) 1 summary: Check that mount profiles cannot be used to mount tmpfs 2 # This is blacklisted on debian because we first have to get the dpkg-vendor patches 3 systems: [-debian-8] 4 restore: | 5 snap remove --purge snapd-hacker-toolbelt 6 rm -rf /var/snap/snapd-hacker-toolbelt 7 rm -f /var/lib/snapd/mount/snap.snapd-hacker-toolbelt.busybox.fstab 8 execute: | 9 echo "Having installed the snapd-hacker-toolbelt snap" 10 snap list | grep -q snapd-hacker-toolbelt || snap install snapd-hacker-toolbelt 11 12 echo "We can change its mount profile externally to mount tmpfs at /var/snap/snapd-hacker-toolbelt/mnt" 13 mkdir -p /var/lib/snapd/mount 14 echo "none /var/snap/snapd-hacker-toolbelt/common/mnt tmpfs rw 0 0" > /var/lib/snapd/mount/snap.snapd-hacker-toolbelt.busybox.fstab 15 16 echo "We can now create the test mount directory" 17 mkdir -p /var/snap/snapd-hacker-toolbelt/common/mnt 18 19 echo "We can now run busybox.true and expect it to fail" 20 ( cd / && ! /snap/bin/snapd-hacker-toolbelt.busybox true )