summary: Check for https://bugs.launchpad.net/snap-confine/+bug/1597842
# This is blacklisted on debian because debian doesn't use apparmor yet
systems: [-debian-8]
details: |
    The snappy execution environment should contain the /usr/src directory
    from the host filesystem when running on a classic distribution.
prepare: |
    echo "Having installed the snapd-hacker-toolbelt snap"
    snap install snapd-hacker-toolbelt
    echo "and having connected the mount-observe interface"
    snap connect snapd-hacker-toolbelt:mount-observe ubuntu-core:mount-observe
execute: |
    cd /
    echo "We can ensure that /usr/src is mounted"
    /snap/bin/snapd-hacker-toolbelt.busybox cat /proc/self/mounts | grep ' /usr/src '
restore: |
    snap remove --purge snapd-hacker-toolbelt
