Page MenuHomeFreeBSD

tests/sys/netinet/tcp_socket: fix build with ATF 0.22+
ClosedPublic

Authored by ngie on Aug 31 2026, 2:36 AM.
Tags
None
Referenced Files
F176031156: D59284.id185464.diff
Thu, Oct 15, 11:22 AM
F176007638: D59284.id185613.diff
Thu, Oct 15, 6:22 AM
Unknown Object (File)
Tue, Oct 13, 11:41 AM
Unknown Object (File)
Fri, Oct 9, 3:20 PM
Unknown Object (File)
Fri, Oct 9, 3:18 PM
Unknown Object (File)
Thu, Oct 8, 5:44 PM
Unknown Object (File)
Tue, Oct 6, 9:42 PM
Unknown Object (File)
Mon, Oct 5, 11:54 AM

Details

Summary

Confirm that creating clients/sockets was successful by testing the
result separate from the assignment and test that the return value is
not -1 instead of testing that the value returned is non-zero.

This fixes the build with [ATF 0.22+][1].

MFC after: 2 weeks
Reported by: clang (-Wparenthesis)

1: https://github.com/freebsd/atf/pull/72

Test Plan

The test passes after this change.

Diff Detail

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