From: Lennart Poettering Date: Fri, 23 Apr 2021 15:17:26 +0000 (+0200) Subject: test: use systemd-run -P instead of -t in TEST-50 X-Git-Tag: v249-rc1~348 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43ed3d294af5b787c604d424d6d49d183b2ea1d6;p=thirdparty%2Fsystemd.git test: use systemd-run -P instead of -t in TEST-50 We want to use the result in a shell pipeline hence use -P mode (pipe mode) instead of -t mode (interactive tty mode) for systemd-run. This shouldn't change much about the test, but is slightly more correct (and quicker). --- diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh index 505d93c13bf..34fe367641d 100755 --- a/test/units/testsuite-50.sh +++ b/test/units/testsuite-50.sh @@ -60,12 +60,12 @@ fi umount "${image_dir}/mount" umount "${image_dir}/mount2" -systemd-run -t -p RootImage="${image}.raw" cat /usr/lib/os-release | grep -q -F "MARKER=1" +systemd-run -P -p RootImage="${image}.raw" cat /usr/lib/os-release | grep -q -F "MARKER=1" mv "${image}.verity" "${image}.fooverity" mv "${image}.roothash" "${image}.foohash" -systemd-run -t -p RootImage="${image}.raw" -p RootHash="${image}.foohash" -p RootVerity="${image}.fooverity" cat /usr/lib/os-release | grep -q -F "MARKER=1" +systemd-run -P -p RootImage="${image}.raw" -p RootHash="${image}.foohash" -p RootVerity="${image}.fooverity" cat /usr/lib/os-release | grep -q -F "MARKER=1" # Let's use the long option name just here as a test -systemd-run -t --property RootImage="${image}.raw" --property RootHash="${roothash}" --property RootVerity="${image}.fooverity" cat /usr/lib/os-release | grep -q -F "MARKER=1" +systemd-run -P --property RootImage="${image}.raw" --property RootHash="${roothash}" --property RootVerity="${image}.fooverity" cat /usr/lib/os-release | grep -q -F "MARKER=1" mv "${image}.fooverity" "${image}.verity" mv "${image}.foohash" "${image}.roothash" @@ -142,10 +142,10 @@ grep -q -F "MARKER=1" "${image_dir}/mount/usr/lib/os-release" umount "${image_dir}/mount" # add explicit -p MountAPIVFS=yes once to test the parser -systemd-run -t -p RootImage="${image}.gpt" -p RootHash="${roothash}" -p MountAPIVFS=yes cat /usr/lib/os-release | grep -q -F "MARKER=1" +systemd-run -P -p RootImage="${image}.gpt" -p RootHash="${roothash}" -p MountAPIVFS=yes cat /usr/lib/os-release | grep -q -F "MARKER=1" -systemd-run -t -p RootImage="${image}.raw" -p RootImageOptions="root:nosuid,dev home:ro,dev ro,noatime" mount | grep -F "squashfs" | grep -q -F "nosuid" -systemd-run -t -p RootImage="${image}.gpt" -p RootImageOptions="root:ro,noatime root:ro,dev" mount | grep -F "squashfs" | grep -q -F "noatime" +systemd-run -P -p RootImage="${image}.raw" -p RootImageOptions="root:nosuid,dev home:ro,dev ro,noatime" mount | grep -F "squashfs" | grep -q -F "nosuid" +systemd-run -P -p RootImage="${image}.gpt" -p RootImageOptions="root:ro,noatime root:ro,dev" mount | grep -F "squashfs" | grep -q -F "noatime" mkdir -p "${image_dir}/result" cat >/run/systemd/system/testservice-50a.service </run/systemd/system/testservice-50c.service </run/systemd/system/testservice-50e.service <