Skip to content

Commit ba910a3

Browse files
arrowdalexey-tikhonov
authored andcommitted
test_responder_common.c: Use correct value to check against
1 parent 397e1ea commit ba910a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tests/cwrap/test_responder_common.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ void check_sock_properties(struct create_pipe_ctx *ctx, mode_t mode)
151151
optlen = sizeof(optval);
152152
ret = getsockopt(ctx->fd, SOL_SOCKET, SO_ACCEPTCONN, &optval, &optlen);
153153
assert_int_equal(ret, 0);
154-
assert_int_equal(optval, 1);
154+
/* getsockopt(SO_ACCEPTCONN) returns 1 on Linux,
155+
* but SO_ACCEPTCONN on FreeBSD
156+
*/
157+
assert_int_not_equal(optval, 0);
155158

156159
/* Check the right protocol */
157160
optlen = sizeof(optval);

0 commit comments

Comments
 (0)