Page MenuHomeFreeBSD

atf: atf-check: stop using a sentinel to convey 'empty' status checks
AcceptedPublic

Authored by kevans on Jun 25 2025, 3:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 12:23 PM
Unknown Object (File)
Mon, Oct 13, 12:23 PM
Unknown Object (File)
Sun, Oct 12, 11:48 PM
Unknown Object (File)
Sun, Oct 12, 11:48 PM
Unknown Object (File)
Sun, Oct 12, 12:18 PM
Unknown Object (File)
Thu, Oct 9, 9:11 PM
Unknown Object (File)
Wed, Oct 8, 9:00 PM
Unknown Object (File)
Tue, Oct 7, 5:01 AM
Subscribers

Details

Reviewers
igoro
kib
Summary

INT_MIN could actually be a valid exit code in the future, so do some
trivial preparation beforehand by conveying an 'empty' check in a
different way. Any other value would be just as arbitrary and it does
not make sense to widen it, so just add another field and use that.

We still have to assign a value to avoid UB (or complicate the function
a bit more), so we'll just keep INT_MIN there now that we won't use it
if empty is set.

Diff Detail

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