integration: Skip test for new privileges if NoNewPrivs is set

Signed-off-by: Ricardo Branco <rbranco@suse.de>
This commit is contained in:
Ricardo Branco
2026-01-02 16:59:23 +01:00
parent 4246d6a078
commit c1ba275d88
+3
View File
@@ -31,6 +31,9 @@ function teardown() {
}
@test "runc run with new privileges" {
if [ $(awk '$1 == "NoNewPrivs:" { print $2; exit }' /proc/self/status) -ne 0 ]; then
skip "requires unset NoNewPrivs"
fi
update_config '.process.noNewPrivileges = false'
runc run test_new_privileges
[ "$status" -eq 0 ]