rust-wasi-smoke-test: relax string matching

Remove the "failed to find a pre-opened file..." string, as "error
opening" is enough. The specific error message is subject to change
and cause false positives.
This commit is contained in:
Jesus Checa Hidalgo 2026-03-10 19:50:25 +01:00
commit 6a6a8ff0ec

View file

@ -70,13 +70,12 @@ rlJournalStart
rlRun "echo \"$TESTSTR\" > input.txt"
# Test without preopening
rlRun "node --experimental-wasi-unstable-preview1 wasi_test_no_preopen.js 2> node.out"
rlRun "node --experimental-wasi-unstable-preview1 wasi_test_no_preopen.js |& tee node.out"
rlAssertGrep "error opening" node.out
rlAssertGrep "failed to find a pre-opened file descriptor" node.out
rlAssertNotExists "output.txt"
# Test with pre-opened directory
rlRun "node --experimental-wasi-unstable-preview1 wasi_test_preopen.js 2> node.out"
rlRun "node --experimental-wasi-unstable-preview1 wasi_test_preopen.js |& tee node.out"
rlAssertNotGrep "error opening" node.out
rlAssertExists "output.txt"
rlAssertGrep "$TESTSTR" output.txt