Skip to content

Fail QEMU and WebAssembly case steps when runtime-source selection fails #696

Closed

Description

@LunaStev

Source-audit reproduction

At 2b325483, three case execution steps use Bash process substitution:

set -euo pipefail
mapfile -t cases < <(
  python3 tools/case_manifest.py runtime-sources "$target_id"
)
for source in "${cases[@]}"; do
  # execute selected case
  ...
done

The producer's exit status is not the exit status of mapfile. A failed selector can therefore leave an empty array and let the execution step succeed without running any cases. pipefail does not cover process substitution.

Minimal shell reproduction, executed during this audit without changing repository files:

bash -c 'set -euo pipefail; mapfile -t cases < <(python3 -c "import sys; sys.exit(2)"); printf "continued; selected=%s\n" "${#cases[@]}"'

Observed shell exit: 0, output continued; selected=0 despite the selector exiting 2. This is a source-audit reproduction, not a claim that the recorded master run encountered a selector error.

Affected sites: RISC-V QEMU, LoongArch QEMU, WebAssembly.

Acceptance

Difficulty: easy; limited to shell exit-status handling.

  • Capture and check successful selector completion before consuming its output, preserving source-path boundaries and ordering.
  • Selector exit 2, including a selector that prints partial output first, fails the step and runs no partial selection.
  • A successful selection still executes every selected case and preserves an actual case failure.
  • A successful but empty selection must have an explicit policy, rather than an accidental green no-op where runtime coverage is required.
  • Add a cheap shell-level regression using a fake selector; no LLVM build or VM is required.

Do not change which sources the selector returns. #690 and contributor PR #691 own generic shared-suite selection; #459 owns runtime capability eligibility.

Activity

  1. added
    bug
    good first issue
    ci
    on Sep 23, 2026
  2. self-assigned this
    on Sep 23, 2026
  3. added a commit that references this issue on Sep 23, 2026
    509a1e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcigood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions