Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

fix `preview2_stdin` test on Asahi Linux (#13126)

Joel Dice60ff5ec79085
diff --git a/tests/all/cli_tests.rs b/tests/all/cli_tests.rs
index 1cc67c591f..f58f5d5253 100644
--- a/tests/all/cli_tests.rs
+++ b/tests/all/cli_tests.rs
@@ -1044,7 +1044,10 @@ fn preview2_stdin() -> Result<()> {
// helper thread depends on how much the OS buffers for us. For now give
// some some slop and assume that OSes are unlikely to buffer more than
// that.
- let slop = 256 * 1024;
+ //
+ // Note that 256 * 1024 is _one_ byte too small on Asahi Linux (possibly
+ // related to 16K page sizes?), hence the `+ 1` here:
+ let slop = 256 * 1024 + 1;
for amt in [0, 100, 100_000] {
let written = count_up_to(amt)?;
assert!(written < slop + amt, "wrote too much {written}");