From: Lennart Poettering Date: Tue, 14 Jan 2025 23:25:22 +0000 (+0100) Subject: test: add test case for tmpfs quota logic + PAMName= ask-password logic X-Git-Tag: v258-rc1~1499^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d58d449fc6b828429f2e4d06779a45318eb17f27;p=thirdparty%2Fsystemd.git test: add test case for tmpfs quota logic + PAMName= ask-password logic --- diff --git a/test/units/TEST-46-HOMED.sh b/test/units/TEST-46-HOMED.sh index 8de170a1c94..3663e539084 100755 --- a/test/units/TEST-46-HOMED.sh +++ b/test/units/TEST-46-HOMED.sh @@ -652,6 +652,22 @@ getent passwd aliastest@myrealm getent passwd aliastest2@myrealm getent passwd aliastest3@myrealm +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 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 rm /dev/shm/quotatestfile1 + + systemctl stop user@"$(id -u tmpfsquota)".service + + wait_for_state tmpfsquota inactive + homectl remove tmpfsquota +fi + systemd-analyze log-level info touch /testok