From 9ecc27d6fcf88ff95dc4f51e9008996120795a20 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 15 Sep 2026 12:02:52 -0600 Subject: [PATCH] update `tests/component-model` submodule and fix test This fixes the test failure described in https://github.com/WebAssembly/component-model/pull/721, where a zero-length write following a cancelled non-zero-length write should return `BLOCKED` but was instead returning `COMPLETED`. --- crates/test-util/src/wast.rs | 7 ------- .../runtime/component/concurrent/futures_and_streams.rs | 3 ++- tests/component-model | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/crates/test-util/src/wast.rs b/crates/test-util/src/wast.rs index ba2e18a6f923..cf9186bb4f90 100644 --- a/crates/test-util/src/wast.rs +++ b/crates/test-util/src/wast.rs @@ -525,13 +525,6 @@ impl WastTest { return true; } - // Waiting for WebAssembly/component-model#716 to land - if self.path.ends_with("async/cancellable.wast") - || self.path.ends_with("binary/binary.wast") - { - return true; - } - // Some tests are known to fail with the pooling allocator if config.pooling { // allocates too much memory for the pooling configuration here diff --git a/crates/wasmtime/src/runtime/component/concurrent/futures_and_streams.rs b/crates/wasmtime/src/runtime/component/concurrent/futures_and_streams.rs index a79a3fe64698..9c5c4a807172 100644 --- a/crates/wasmtime/src/runtime/component/concurrent/futures_and_streams.rs +++ b/crates/wasmtime/src/runtime/component/concurrent/futures_and_streams.rs @@ -3592,6 +3592,7 @@ impl Instance { // read). // ``` + let write_count = count; let write_complete = count == 0 || read_count > 0; let read_complete = count > 0; let read_buffer_remaining = count < read_count; @@ -3645,7 +3646,7 @@ impl Instance { // zero-length rendezvous case this specifically won't execute // the `read_complete` logic above, which is intentional, as the // reader remains blocked. - if read_buffer_remaining || (count == 0 && read_count == 0) { + if read_buffer_remaining || (write_count == 0 && read_count == 0) { let transmit = concurrent_state.get_mut(transmit_id)?; transmit.read = ReadState::GuestReady { ty: read_ty, diff --git a/tests/component-model b/tests/component-model index 7c676115e93c..531ee4b26a8e 160000 --- a/tests/component-model +++ b/tests/component-model @@ -1 +1 @@ -Subproject commit 7c676115e93cd7d54c1732d95c54c6a3de7c5ae0 +Subproject commit 531ee4b26a8ec78276603a24113b418df6e3e44c