From 19da1d95a80edd9ef77aae860e9e6551c6de1b3d Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 1 Jun 2023 11:56:29 +0200 Subject: [PATCH] test: set root ownership of tmp directory in system tests Allow the tests to be started under a non-zero GID. --- test/system/test.common | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/system/test.common b/test/system/test.common index 7005c9e..aa48ac6 100644 --- a/test/system/test.common +++ b/test/system/test.common @@ -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 $*:"