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 test-programs crate, which builds and runs whole programs
compiled to wasm32-wasi.
To actually run these tests, the test-programs feature must be enabled, e.g.:
cargo test --features test-programs/test_programs --package test-programs