The test had been failing since the upgrade to 6.6.3p1 in commit
2dbfd8eec4.
* gnu/services/mail.scm (opensmtpd-activation): Create /var/spool/mail.
* gnu/tests/mail.scm (run-opensmtpd-test): Check /var/spool/mail instead
of /var/mail.
Previously the 'wait' loop would run for ~1024 seconds, at which point
we'd reach the file descriptor limit due to the leak in 'queue-empty?'.
* gnu/tests/mail.scm (run-opensmtpd-test)[test]("mail arrived"): In
'queue-empty?', close PIPE to avoid file descriptor leak. In 'wait'
loop, arrange to run at most 20 times.
* gnu/tests/mail.scm (%getmail-os): Rewrite so that the "alice" account
has a password.
(run-getmail-test)[test]("set password for alice"): Remove. This would
not work since commit 8b9cad01e9 since
'passwd' would no longer be in $PATH.
This follows up on commit 0d48690908.
* gnu/services/mail.scm (%default-opensmtpd-config-file): Adapt to ‘new’
≥6.4 grammar.
* gnu/tests/mail.scm (%opensmtpd-os): Likewise.
Getmail is a mail retriever written in Python, this commit adds a service-type
to run getmail. I'm looking at this, as it's a convinient way of getting
mailing list messages in to Patchwork.
I initially tried putting this in the (gnu services mail) module, but due to
also trying to use the define-configuration pattern, it conflicted with the
dovecot service.
* gnu/services/getmail.scm: New file.
* gnu/local.mk: Add it.
* gnu/tests/mail.scm (%getmail-os, %test-getmail): New variables.
(run-getmail-test): New procedure.
Since commit dc7b3e5633, 'start-service' returns
the Shepherd's representation of the service as a sexp, and '#f' if the
service fails to start. Also, it doesn't throw an exception when the service
fails to start, so relying on an exception instead of relying on its return
value is a false positive.
* gnu/tests/base.scm (run-nss-mdns-test): Split tests so to check the return
value of 'start-service'.
(run-mcron-test, run-nss-mdns-test): Use 'test-assert' with the return value
of 'start-service'.
* gnu/tests/admin.scm (run-tailon-test): Idem.
* gnu/tests/dict.scm (run-dicod-test): Idem.
* gnu/tests/mail.scm (run-opensmtpd-test, run-exim-test, run-dovecot-test):
Idem.
* gnu/tests/messaging.scm (run-xmpp-test, run-bitlbee-test): Idem.
* gnu/tests/nfs.scm (run-nfs-test): Idem.
* gnu/tests/rsync.scm (run-rsync-test): Idem.
* gnu/tests/ssh.scm (run-ssh-test): Idem.
* gnu/tests/version-control.scm (run-cgit-test, run-git-http-test): Idem.
* gnu/tests/web.scm (run-php-fpm-test): Idem.