tests: add integration test for toybox

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
This commit is contained in:
Zygmunt Krynicki 2025-01-16 16:37:38 +01:00
parent 2ab2c8f8a1
commit be47567d27
2 changed files with 12 additions and 0 deletions

View file

@ -31,6 +31,7 @@ packages:
- python3-tk
- python3-ttkthemes
- swig
- toybox
endef
# Ubuntu shares cloud-init profile with Debian.

View file

@ -0,0 +1,11 @@
summary: smoke test for the toybox profile
systems:
# Toybox is not packaged on openSUSE
- -opensuse-*
execute: |
# Toybox works (this is a very basic test).
test "$(toybox id -u)" -eq 0
# The profile may be used explicitly.
aa-exec -p toybox toybox cat /proc/self/attr/current | MATCH 'toybox \(unconfined\)'
# The profile is attached implicitly based on path name.
toybox cat /proc/self/attr/current | MATCH 'toybox \(unconfined\)'