mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
Add proper IO events for unbound sockets
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
8628543067
commit
9211061181
@ -234,14 +234,12 @@ FN_TEST(poll)
|
||||
struct pollfd pfd = { .events = POLLIN | POLLOUT };
|
||||
|
||||
pfd.fd = sk_unbound;
|
||||
// FIXME: Uncomment this
|
||||
// TEST_RES(poll(&pfd, 1, 0),
|
||||
// (pfd.revents & (POLLIN | POLLOUT)) == POLLOUT);
|
||||
TEST_RES(poll(&pfd, 1, 0),
|
||||
(pfd.revents & (POLLIN | POLLOUT)) == POLLOUT);
|
||||
|
||||
pfd.fd = sk_bound;
|
||||
// FIXME: Uncomment this
|
||||
// TEST_RES(poll(&pfd, 1, 0),
|
||||
// (pfd.revents & (POLLIN | POLLOUT)) == POLLOUT);
|
||||
TEST_RES(poll(&pfd, 1, 0),
|
||||
(pfd.revents & (POLLIN | POLLOUT)) == POLLOUT);
|
||||
|
||||
pfd.fd = sk_listen;
|
||||
TEST_RES(poll(&pfd, 1, 0), (pfd.revents & (POLLIN | POLLOUT)) == 0);
|
||||
|
Reference in New Issue
Block a user