test: add test case for tmpfs quota logic + PAMName= ask-password logic
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user