mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 06:15:33 -04:00
capsicum-test: skip SCTP tests if SCTP not available
Skip the test rather than failing if SCTP is not available (e.g., if
sctp.ko is not loaded).
Also submitted upstream as
https://github.com/google/capsicum-test/pull/61
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46999
(cherry picked from commit 1d83090d85)
This commit is contained in:
parent
ff5a685270
commit
e7f3888b31
1 changed files with 3 additions and 0 deletions
|
|
@ -61,6 +61,9 @@ static int SctpClient(int port, unsigned char byte) {
|
|||
|
||||
TEST(Sctp, Socket) {
|
||||
int sock = socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
|
||||
if (sock == -1 && errno == EPROTONOSUPPORT) {
|
||||
GTEST_SKIP() << "socket(..., IPPROTO_SCTP) -> EPROTONOSUPPORT";
|
||||
}
|
||||
EXPECT_OK(sock);
|
||||
if (sock < 0) return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue