Page MenuHomeFreeBSD

mail: Further refine the SIGINT test.
ClosedPublic

Authored by des on Wed, Apr 30, 5:26 PM.
Tags
None
Referenced Files
F116622561: D50092.id154923.diff
Thu, May 8, 12:39 PM
Unknown Object (File)
Tue, May 6, 8:15 PM
Unknown Object (File)
Tue, May 6, 7:50 AM
Unknown Object (File)
Mon, May 5, 1:11 PM
Unknown Object (File)
Mon, May 5, 1:02 PM
Unknown Object (File)
Mon, May 5, 7:08 AM
Unknown Object (File)
Sun, May 4, 6:38 PM
Unknown Object (File)
Sun, May 4, 4:51 PM
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.Wed, Apr 30, 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.Fri, May 2, 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.Fri, May 2, 8:41 AM
This revision is now accepted and ready to land.Mon, May 5, 4:35 PM
This revision was automatically updated to reflect the committed changes.