From f9e56e04bee961c8db6910ba1b9d774793953618 Mon Sep 17 00:00:00 2001 From: guanyi3 Date: Fri, 10 Oct 2025 11:45:45 +0800 Subject: [PATCH] usrsocktest: fix TEST_ASSERT_EQUAL fail for POLLIN This assertion should be removed because the POLLIN event is now only raised when there is data pending to be received. Previously, POLLIN was incorrectly set as soon as the connection was established, even when no data was available, which was not consistent with the expected behavior. Signed-off-by: guanyi3 --- examples/usrsocktest/usrsocktest_remote_disconnect.c | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/usrsocktest/usrsocktest_remote_disconnect.c b/examples/usrsocktest/usrsocktest_remote_disconnect.c index 1e3681f9d95..79ccbfefba5 100644 --- a/examples/usrsocktest/usrsocktest_remote_disconnect.c +++ b/examples/usrsocktest/usrsocktest_remote_disconnect.c @@ -871,7 +871,6 @@ static void remote_disconnect_poll2(struct usrsocktest_daemon_conf_s *dconf) TEST_ASSERT_EQUAL(1, ret); TEST_ASSERT_EQUAL(0, pfd.revents & POLLERR); TEST_ASSERT_EQUAL(POLLHUP, pfd.revents & POLLHUP); - TEST_ASSERT_EQUAL(*events & POLLIN, pfd.revents & POLLIN); TEST_ASSERT_EQUAL(0, pfd.revents & POLLOUT); TEST_ASSERT_EQUAL(1, usrsocktest_daemon_get_num_active_sockets()); TEST_ASSERT_EQUAL(0, usrsocktest_daemon_get_num_connected_sockets());