If SCTP is not available the test should be skipped, not fail.
Sample output:
Note: Google Test filter = Sctp.Socket [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. Generating temporary directory root: /tmp/cptst8IjSVg [----------] 1 test from Sctp [ RUN ] Sctp.Socket /home/emaste/src/freebsd-git/wipbsd/contrib/capsicum-test/sctp.cc:65: Skipped socket(..., IPPROTO_SCTP) -> EPROTONOSUPPORT [ SKIPPED ] Sctp.Socket (0 ms) [----------] 1 test from Sctp (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 0 tests. [ SKIPPED ] 1 test, listed below: [ SKIPPED ] Sctp.Socket