From: Michal Koutný Date: Fri, 26 Jul 2024 08:44:10 +0000 (+0200) Subject: test: Fail cgroup delegation test when user cannot be created X-Git-Tag: v257-rc1~813^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F27855%2Fhead;p=thirdparty%2Fsystemd.git test: Fail cgroup delegation test when user cannot be created It means: a) user cannot be created, something's wrong in the test environment -> fail the test; b) user already exists, we shall not continue and delete (foreign) user. --- diff --git a/test/units/TEST-19-CGROUP.delegate.sh b/test/units/TEST-19-CGROUP.delegate.sh index 52d47fc8792..7f3a7059e2c 100755 --- a/test/units/TEST-19-CGROUP.delegate.sh +++ b/test/units/TEST-19-CGROUP.delegate.sh @@ -74,7 +74,7 @@ testcase_attributes() { testcase_scope_unpriv_delegation() { # Check that unprivileged delegation works for scopes - useradd test ||: + useradd test trap "userdel -r test" RETURN systemd-run --uid=test \ --property="User=test" \