Skip to content

Reject compiler failures in cases that expect a nonzero program exit #577

Closed

Description

@LunaStev

Executable reproduction

At PR #574 head ed149e7553c06efc30b5167920cc301563d6afb3, run_and_classify compares the exit status of the combined wavec run command with expected-exit. It immediately accepts a matching nonzero status, before checking whether compilation or program execution produced it.

I created a temporary source:

fun main() -> i32 {
    return missing_name;
}

Calling the actual run_and_classify with this source, TestMetadata(expected_exit=1), no manifest compile-only target, and [wavec, "run", source] prints:

PASS (expected exit=1)

and returns (3, None). The real compiler rejects the unresolved identifier; no valid executable runs. The repository already has an expected-exit=1 runtime case in tests/cases/linux/amd64/test21.wave.

Required behavior

Distinguish successful compilation/linking from the generated program's status when validating expected nonzero runtime exits. A matching compiler failure must never satisfy a program-exit expectation. Preserve stdin, target selection, process-tree cleanup, and valid nonzero-exit cases; do not rely on recognizing one diagnostic string.

Acceptance:

  • Invalid Wave source with expected-exit=1 fails the case.
  • A valid program returning 1 passes that expectation.
  • Link failures and launch failures cannot satisfy it.
  • Unexpected compiler/runtime crashes remain failures, with useful phase/status information.

Found while auditing the failure classification used by #493's CI lane. This is a separate test-oracle bug, not an explanation for the 135 access violations observed there.

Activity

  1. added
    bug
    help wanted
    needs testing
    ci
    on Sep 11, 2026
  2. added a commit that references this issue on Sep 12, 2026
    291ec53
  3. self-assigned this
    on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcihelp wantedneeds testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions