Page MenuHomeFreeBSD

system(3): Address test robustness issue
ClosedPublic

Authored by des on Sat, Mar 7, 6:17 PM.
Tags
None
Referenced Files
F148793667: D55709.id173449.diff
Fri, Mar 20, 6:21 AM
F148786848: D55709.id173309.diff
Fri, Mar 20, 5:32 AM
Unknown Object (File)
Thu, Mar 19, 11:15 AM
Unknown Object (File)
Thu, Mar 19, 2:44 AM
Unknown Object (File)
Tue, Mar 17, 11:48 PM
Unknown Object (File)
Mon, Mar 16, 10:43 PM
Unknown Object (File)
Thu, Mar 12, 11:48 AM
Unknown Object (File)
Wed, Mar 11, 10:32 AM
Subscribers

Details

Summary

Don't assume that SIGINT and SIGQUIT are set to SIG_DFL at the start
of the test. Instead, retrieve their current dispositions and verify
that they are restored at the end of the test.

MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71298
Build 68181: arc lint + arc unit

Event Timeline

des requested review of this revision.Sat, Mar 7, 6:17 PM
kevans added inline comments.
lib/libc/tests/stdlib/system_test.c
134

Two points:

1.) I think we want another set of tests, then, and be explicit about it: one that explicitly sets them to SIG_DFL and one that ignores them, so that we can be sure no matter the test runner's configuration that it's restoring rather than that the disposition upon return was accidentally right

2.) We should probably use sigaction() for recording existing disposition if we suspect atf might have setup a handler to avoid breaking it

Agreed out-of-band that it's fine to defer testing both behaviors for the time being

This revision is now accepted and ready to land.Mon, Mar 9, 8:36 PM
This revision now requires review to proceed.Mon, Mar 9, 8:37 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mon, Mar 9, 8:41 PM
This revision was automatically updated to reflect the committed changes.