Modify the `poll_oneoff_files` test to avoid assuming that `poll_oneoff` returns all pending events, as it may sometimes return only a subset of events. When multiple events are expected, use a loop, and loop until all events have been recorded.
This is the wasi-tests crate, which contains source code for the system-level WASI tests.
Building these tests requires that the wasm32-wasi target be installed.