Page MenuHomeFreeBSD

mail: Further refine the SIGINT test.
ClosedPublic

Authored by des on Apr 30 2025, 5:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 4, 8:16 AM
Unknown Object (File)
Tue, Sep 2, 12:48 AM
Unknown Object (File)
Sun, Aug 24, 11:32 PM
Unknown Object (File)
Tue, Aug 12, 11:31 AM
Unknown Object (File)
Jul 29 2025, 5:29 AM
Unknown Object (File)
Jul 12 2025, 10:53 AM
Unknown Object (File)
Jul 9 2025, 7:12 AM
Unknown Object (File)
Jul 9 2025, 4:00 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 63831
Build 60715: arc lint + arc unit

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.