Stream: git-wasmtime

Topic: wasmtime / PR #6577 Fix a flaky poll_oneoff test


view this post on Zulip Wasmtime GitHub notifications bot (Jun 13 2023 at 20:06):

alexcrichton opened PR #6577 from alexcrichton:fix-flaky-test to bytecodealliance:main:

This commit fixes a test that has failed on CI and seems flaky. This test asserts that stderr/stdout are writable and that a 200ms timeout does not elapse when calculating this. The implementation, on Windows at least, of poll_oneoff always reports stdout/stderr as "ready for write" meaning that this test should trivially pass. The flakiness comes from the timeout parameter where apparently sometimes on CI the determination of this takes more than 200ms. This means that the timer subscription may or may not fire depending on the timing of the test, and currently the test always fails if the timeout subscription fires.

This commit updates the test to store whether a timeout has passed and only fail if poll_oneoff is attempted when the timeout has already elapsed. This will allow the timeout to fire so long as the two streams are considered writable at the same time, achieving the desired result of the test to assert that, without timing out both stdout and stderr are considered writable.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 13 2023 at 20:06):

alexcrichton requested pchickey for a review on PR #6577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 13 2023 at 20:06):

alexcrichton requested wasmtime-core-reviewers for a review on PR #6577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 13 2023 at 21:02):

alexcrichton updated PR #6577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2023 at 21:40):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2023 at 13:32):

alexcrichton updated PR #6577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2023 at 13:32):

alexcrichton has enabled auto merge for PR #6577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2023 at 14:46):

alexcrichton merged PR #6577.


Last updated: Nov 22 2024 at 16:03 UTC