WebAssembly / WebAssembly/binaryen

support.run_command ignores --no-fail-fast

Open
#8,735 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

When using --no-fail-fast there are some tests that still abort the test suite when they fail. Notably code that uses support.run_command which throws exceptions that are never caught.

Traceback (most recent call last):
  File "/builds/sertonix/aports/community/binaryen/src/binaryen-version_128/check.py", line 488, in <module>
    sys.exit(main())
             ^^^^^^
  File "/builds/sertonix/aports/community/binaryen/src/binaryen-version_128/check.py", line 471, in main
    TEST_SUITES[test]()
  File "/builds/sertonix/aports/community/binaryen/src/binaryen-version_128/check.py", line 422, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/builds/sertonix/aports/community/binaryen/src/binaryen-version_128/scripts/test/wasm2js.py", line 163, in test_wasm2js
    test_wasm2js_output()
  File "/builds/sertonix/aports/community/binaryen/src/binaryen-version_128/scripts/test/wasm2js.py", line 126, in test_wasm2js_output
    out = support.run_command(cmd, expected_err='', err_ignore='ExperimentalWarning')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builds/sertonix/aports/community/binaryen/src/binaryen-version_128/scripts/test/support.py", line 154, in run_command
    raise Exception(f"run_command `{' '.join(cmd)}` failed ({code}) {err or ''}")
Exception: run_command `/usr/bin/node --experimental-modules --no-warnings --loader /builds/sertonix/aports/community/binaryen/src/binaryen-version_128/scripts/test/node-esm-loader.mjs a.2asm.asserts.mjs` failed (1) 
node:internal/modules/run_main:107
    triggerUncaughtException(
    ^
assertion failed on line 345
(Use `node --trace-uncaught ...` to show where the exception was thrown)
Node.js v24.14.0

I tried at https://github.com/WebAssembly/binaryen/pull/8503 bit it is not a good change.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scripts/test/support.py, especially run_command, then trace --no-fail-fast handling in check.py and the caller in scripts/test/wasm2js.py. Reproduce the failure with the affected test command and confirm that a failed run_command reports the failure without aborting the full suite when --no-fail-fast is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, python, wasm
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.