Files
snapd/tests/main/debug-sandbox/task.yaml
Sergio Cazzolato fe6e39a2bc tests: more details in spread tests - part 13 (#13924)
* Adding more details to tests - part 13

* Add more details

* adding more tests

* Update tests/main/debs/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/debug-sandbox/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/econnreset/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/enable-disable/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/health/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/snap-validate-enforce/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/snap-validate-with-store/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/enable-disable/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/debug-paths/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/default-tracks/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

* Update tests/main/enable-disable/task.yaml

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>

---------

Co-authored-by: Miguel Pires <miguelpires94@gmail.com>
2024-05-02 08:14:13 -03:00

38 lines
1.5 KiB
YAML

summary: Verify sandbox is correctly reported
details: |
The sandbox command prints tags describing features of individual sandbox
components used by snapd on a given system.
This test checks that in the supported systems the command
`snap debug sandbox-feature` reports the proper information like
the supported features for: apparmor, seccomp, udev, etc.
execute: |
case "$SPREAD_SYSTEM" in
ubuntu-core*)
snap debug sandbox-features | grep "confinement-options: " | NOMATCH "classic"
snap debug sandbox-features | MATCH "apparmor: .+"
;;
ubuntu-*|opensuse-*|debian-sid-*|arch-linux-*)
# Debian, openSUSE, Arch because partial apparmor is enabled
snap debug sandbox-features | MATCH "apparmor: .+"
;;
fedora-*)
# Fedora because it uses SELinux
snap debug sandbox-features | NOMATCH "apparmor: .+"
;;
esac
snap debug sandbox-features | MATCH "dbus: .+"
snap debug sandbox-features | MATCH "kmod: .+"
snap debug sandbox-features | MATCH "mount: .+"
snap debug sandbox-features | MATCH "seccomp: .+"
snap debug sandbox-features | MATCH "udev: .+"
# The command can be used as script helper
snap debug sandbox-features --required kmod:mediated-modprobe
not snap debug sandbox-features --required magic:evil-bit
# Multiple requirements may be listed
snap debug sandbox-features --required kmod:mediated-modprobe --required mount:stale-base-invalidation