]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Fail cgroup delegation test when user cannot be created 27855/head
authorMichal Koutný <mkoutny@suse.com>
Fri, 26 Jul 2024 08:44:10 +0000 (10:44 +0200)
committerMichal Koutný <mkoutny@suse.com>
Fri, 26 Jul 2024 08:44:10 +0000 (10:44 +0200)
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.

test/units/TEST-19-CGROUP.delegate.sh

index 52d47fc87924daf94215974baf573beeab3b16ba..7f3a7059e2cd61c77b9ee133e362bd0498b8bf4d 100755 (executable)
@@ -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" \