2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 13:58:22 +00:00

tests: measure toybox with actual-profile-of

This should be a more readable example to follow in other tests.  The
toybox test was special given the fact that it is a shell itself, and is
fairly programmable.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
This commit is contained in:
Zygmunt Krynicki 2025-01-23 13:34:15 +01:00
parent 23df780544
commit ffd38b7ac4

View File

@ -5,7 +5,6 @@ systems:
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\)'
# The profile is attached based on the program path.
"$SPREAD_PATH"/tests/bin/actual-profile-of toybox | MATCH 'toybox \(unconfined\)'