From: Zbigniew Jędrzejewski-Szmek Date: Fri, 28 Mar 2025 17:00:38 +0000 (+0100) Subject: TEST-46-HOMED: write zeros instead of random bytes X-Git-Tag: v258-rc1~969^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5399910671d3d00f268ba2aa49391cbfb43bb5e3;p=thirdparty%2Fsystemd.git TEST-46-HOMED: write zeros instead of random bytes This should be faster, and equivalent for the purposes of quota calculation. --- diff --git a/test/units/TEST-46-HOMED.sh b/test/units/TEST-46-HOMED.sh index 78c91044b81..3bd6ebda480 100755 --- a/test/units/TEST-46-HOMED.sh +++ b/test/units/TEST-46-HOMED.sh @@ -669,10 +669,10 @@ if findmnt -n -o options /tmp | grep -q usrquota ; then NEWPASSWORD=quux homectl create tmpfsquota --storage=subvolume --dev-shm-limit=50K -P - run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u tmpfsquota dd if=/dev/urandom of=/dev/shm/quotatestfile1 bs=1024 count=30 - (! run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u tmpfsquota dd if=/dev/urandom of=/dev/shm/quotatestfile2 bs=1024 count=30) + run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u tmpfsquota dd if=/dev/zero of=/dev/shm/quotatestfile1 bs=1024 count=30 + (! run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u tmpfsquota dd if=/dev/zero of=/dev/shm/quotatestfile2 bs=1024 count=30) run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u tmpfsquota rm /dev/shm/quotatestfile1 /dev/shm/quotatestfile2 - run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u tmpfsquota dd if=/dev/urandom of=/dev/shm/quotatestfile1 bs=1024 count=30 + run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u tmpfsquota dd if=/dev/zero of=/dev/shm/quotatestfile1 bs=1024 count=30 run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u tmpfsquota rm /dev/shm/quotatestfile1 systemctl stop user@"$(id -u tmpfsquota)".service @@ -705,7 +705,7 @@ test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareate test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest -a furb sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/furb" # Install a PK rule that allows 'subareatest' user to invoke run0 without password, just for testing -cat > /usr/share/polkit-1/rules.d/subareatest.rules <<'EOF' +cat >/usr/share/polkit-1/rules.d/subareatest.rules <<'EOF' polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.systemd1.manage-units" && subject.user == "subareatest") {