]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: set root ownership of tmp directory in system tests
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 1 Jun 2023 09:56:29 +0000 (11:56 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 1 Jun 2023 12:52:56 +0000 (14:52 +0200)
Allow the tests to be started under a non-zero GID.

test/system/test.common

index 7005c9e1b937cc1d53c46c8a2df336316eb578cc..aa48ac67a6d350b5f9b93fd26378642062bc1e22 100644 (file)
@@ -42,6 +42,8 @@ test_start() {
                su "$user" -s /bin/sh -c "touch $TEST_DIR/test" 2> /dev/null || \
                        test_skip "$user cannot access $TEST_DIR"
                rm "$TEST_DIR/test"
+       else
+               chown 0:0 "$TEST_DIR" || test_skip "could not chown $TEST_DIR"
        fi
 
        echo "Testing $*:"