From ffd38b7ac40b70f37a4e7dacf30a80fb496557f3 Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Thu, 23 Jan 2025 13:34:15 +0100 Subject: [PATCH] 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 --- tests/profiles/toybox/task.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/profiles/toybox/task.yaml b/tests/profiles/toybox/task.yaml index 44e2f6ea1..6c8217c8b 100644 --- a/tests/profiles/toybox/task.yaml +++ b/tests/profiles/toybox/task.yaml @@ -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\)'