Fix writing timeout events. Check that we only return one timeout event.
This commit is contained in:
@@ -65,11 +65,17 @@ unsafe fn test_stdin_read() {
|
||||
r#type: wasi::EVENTTYPE_CLOCK,
|
||||
u: wasi::SubscriptionU { clock },
|
||||
},
|
||||
// Make sure that timeout is returned only once even if there are multiple read events
|
||||
wasi::Subscription {
|
||||
userdata: 1,
|
||||
r#type: wasi::EVENTTYPE_FD_READ,
|
||||
u: wasi::SubscriptionU { fd_readwrite },
|
||||
},
|
||||
wasi::Subscription {
|
||||
userdata: 42,
|
||||
r#type: wasi::EVENTTYPE_FD_READ,
|
||||
u: wasi::SubscriptionU { fd_readwrite },
|
||||
},
|
||||
];
|
||||
let out = poll_oneoff_impl(&r#in, 1);
|
||||
let event = &out[0];
|
||||
|
||||
Reference in New Issue
Block a user