/* Timeout should work the same for blocking & non-blocking threads */
static void test_socketpair_poll_timeout_common(struct net_socketpair_fixture *fixture)
/* Timeout should work the same for blocking & non-blocking threads */
static void test_socketpair_poll_timeout_common(struct net_socketpair_fixture *fixture)
{
	int res;
	struct pollfd fds[1];
	memset(fds, 0, sizeof(fds));
	fds[0].fd = fixture->sv[0];
	fds[0].events |= POLLIN;
	res = poll(fds, 1, 1);
	zassert_equal(res, 0, "poll: expected: 0 actual: %d", res);
	for (size_t i = 0; i < CONFIG_NET_SOCKETPAIR_BUFFER_SIZE; ++i) {
		res = send(fixture->sv[0], "x", 1, 0);
		zassert_equal(res, 1, "send() failed: %d", res);
	}
	memset(fds, 0, sizeof(fds));
	fds[0].fd = fixture->sv[0];
	fds[0].events |= POLLOUT;
	res = poll(fds, 1, 1);
	zassert_equal(res, 0, "poll: expected: 0 actual: %d", res);
}