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.

(cherry picked from commit 3e6e3e6d40)
This commit is contained in:
Michal Koutný 2024-07-26 10:44:10 +02:00 committed by Luca Boccassi
parent 161286e989
commit 8ea1e6450c

View File

@ -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" \