From: Zbigniew Jędrzejewski-Szmek Date: Mon, 29 May 2023 18:52:33 +0000 (+0200) Subject: TEST-58: create config files as root X-Git-Tag: v254-rc1~338^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dfb3ebfd60b138eb9d02e1be71db8b376fb8bc6e;p=thirdparty%2Fsystemd.git TEST-58: create config files as root There is really no reason to go out of our way to create the config files as the unprivileged user. And in the logs, the runas calls are quite verbose, distracting from the interesting stuff. Also add .defs/.imgs/.root to the temporary paths to make them easier to distinguish in the logs. --- diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh index b1b40851dba..0aaf597e9ad 100755 --- a/test/units/testsuite-58.sh +++ b/test/units/testsuite-58.sh @@ -95,10 +95,11 @@ testcase_basic() { local defs imgs output local loop volume - defs="$(runas testuser mktemp --directory "/tmp/test-repart.XXXXXXXXXX")" - imgs="$(runas testuser mktemp --directory "/var/tmp/test-repart.XXXXXXXXXX")" + defs="$(mktemp --directory "/tmp/test-repart.defs.XXXXXXXXXX")" + imgs="$(runas testuser mktemp --directory "/var/tmp/test-repart.imgs.XXXXXXXXXX")" # shellcheck disable=SC2064 trap "rm -rf '$defs' '$imgs'" RETURN + chmod a+rx "$defs" # 1. create an empty image @@ -118,21 +119,21 @@ last-lba: 2097118" # 2. Testing with root, root2, home, and swap - runas testuser tee "$defs/root.conf" <"$defs/verity.openssl.cnf" <"$defs/verity.openssl.cnf" <