diff --git a/tests/sys/kern/sendfile_helper.c b/tests/sys/kern/sendfile_helper.c --- a/tests/sys/kern/sendfile_helper.c +++ b/tests/sys/kern/sendfile_helper.c @@ -84,7 +84,7 @@ if (fcntl(sv[0], F_SETFL, flags) == -1) err(1, "fcntl +O_NONBLOCK"); - if (connect(sv[0], (void *)&sin, sizeof(sin)) != -1 || + if (connect(sv[0], (void *)&sin, sizeof(sin)) == -1 && errno != EINPROGRESS) err(1, "connect cs");