aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mail/tests
Commit message (Collapse)AuthorAgeFilesLines
* mail: tests: reset signal disposition before testingKyle Evans2025-05-291-0/+11
| | | | | | | | | | | | | | As a good citizen of the OS, mail(1) won't try to catch signals that were ignored when it started and it won't reconfigure its signal mask unless it's going to try and handle a signal. The test should start mail(1) off in a well-known state for the signal that it's trying to test in order to get the behavior that's desired. No functional change, just improves the resilience of the test. Reviewed by: des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50599
* mail: Add test cases for SIGHUP.Dag-Erling Smørgrav2025-05-142-16/+44
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D50296
* mail: Further refine the SIGINT test.Dag-Erling Smørgrav2025-05-061-10/+17
| | | | | | | | | | | | * Wait at least 1-2 s before sending the second SIGINT. * If the child is still running after 15 s, send a SIGKILL. * Improve the exit status checks. Fixes: 59597032c948 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50092
* mail: Exit non-zero on failure to collect mail.Dag-Erling Smørgrav2025-04-291-2/+3
| | | | | | | | | | While here, avoid non-portable `pipe2()` in the regression test. Fixes: 59597032c948 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D50069
* mail: Don't trap signals we shouldn't.Dag-Erling Smørgrav2025-04-272-0/+153
When in interactive mode, trap SIGINT, SIGHUP, and tty-related signals. Otherwise, leave signals untouched as required by POSIX. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D50011