From 0b50274680eea4a1553fc6119b30464bfb097454 Mon Sep 17 00:00:00 2001 From: Marcin Mielniczuk Date: Wed, 8 Jan 2020 20:15:05 +0100 Subject: [PATCH] WIP --- .../wasi-tests/src/bin/poll_oneoff.rs | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs b/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs index ddfbce0df9..362ff95c94 100644 --- a/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs +++ b/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs @@ -33,10 +33,6 @@ unsafe fn test_timeout() { }]; let out = poll_oneoff_impl(&r#in, 1); let event = &out[0]; - assert_eq!( - event.userdata, CLOCK_ID, - "the event.userdata should contain clock_id specified by the user" - ); assert_eq!( event.error, wasi::ERRNO_SUCCESS, @@ -47,6 +43,10 @@ unsafe fn test_timeout() { wasi::EVENTTYPE_CLOCK, "the event.type should equal clock" ); + assert_eq!( + event.userdata, CLOCK_ID, + "the event.userdata should contain clock_id specified by the user" + ); } unsafe fn test_stdin_read() { @@ -71,18 +71,9 @@ unsafe fn test_stdin_read() { 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]; - assert_eq!( - event.userdata, CLOCK_ID, - "the event.userdata should contain clock_id specified by the user" - ); assert_eq!( event.error, wasi::ERRNO_SUCCESS, @@ -93,6 +84,10 @@ unsafe fn test_stdin_read() { wasi::EVENTTYPE_CLOCK, "the event.type should equal clock" ); + assert_eq!( + event.userdata, CLOCK_ID, + "the event.userdata should contain clock_id specified by the user" + ); } unsafe fn test_stdout_stderr_write() {