Page MenuHomeFreeBSD

mail: Further refine the SIGINT test.
ClosedPublic

Authored by des on Apr 30 2025, 5:26 PM.
Tags
None
Referenced Files
F144369418: D50092.id154684.diff
Sun, Feb 8, 2:23 AM
Unknown Object (File)
Sat, Feb 7, 7:23 PM
Unknown Object (File)
Sat, Jan 31, 3:37 AM
Unknown Object (File)
Dec 28 2025, 11:56 AM
Unknown Object (File)
Dec 28 2025, 12:56 AM
Unknown Object (File)
Dec 2 2025, 1:24 AM
Unknown Object (File)
Nov 28 2025, 11:48 AM
Unknown Object (File)
Nov 25 2025, 9:26 AM
Subscribers

Details

Summary
  • 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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Apr 30 2025, 5:26 PM
markj added inline comments.
usr.bin/mail/tests/mail_sigint_test.c
110

Should we check the return value of kill()?

122–123

What's the point of checking this? The preceding ATF_CHECK will halt the test if the condition isn't true.

kevans added inline comments.
usr.bin/mail/tests/mail_sigint_test.c
122–123

CHECKs don't halt execution like REQUIREs do

des marked 3 inline comments as done.May 2 2025, 8:41 AM
des added inline comments.
usr.bin/mail/tests/mail_sigint_test.c
110

I don't really see the point. This is a safety valve; it can only fail if the process no longer exists, which is what we want. I might ATF_CHECK the SIGINT one though.

des marked an inline comment as done.May 2 2025, 8:41 AM
This revision is now accepted and ready to land.May 5 2025, 4:35 PM
This revision was automatically updated to reflect the committed changes.