Skip to content

fix(runner): run bench file teardown before aborting on a bad annotation - #1330

Merged
Chemaclass merged 1 commit into
mainfrom
fix/1322-bench-aborts-without-tear-down-after-script
Aug 19, 2026
Merged

fix(runner): run bench file teardown before aborting on a bad annotation#1330
Chemaclass merged 1 commit into
mainfrom
fix/1322-bench-aborts-without-tear-down-after-script

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1322

A malformed benchmark annotation aborts bashunit bench with exit 1 from inside call_bench_functions. set_up_before_script has already run at that point, so the file's tear_down_after_script never does and whatever it acquired is leaked.

💡 Changes

A malformed benchmark annotation aborted the run with `exit 1` from inside
call_bench_functions. set_up_before_script had already run, and the file's
tear_down_after_script never did.

Return the failure to the bench loop instead, so the file's cleanup block
runs, and abort from there. The annotation error still stops the whole run
with the same message and exit code: a value the runner cannot honour would
otherwise measure something other than what the annotation asked for
(#884).

The test runner has the same defect through its own @timeout/@Retry
validation. Filed separately as #1329 rather than widened into this fix.

Closes #1322
@Chemaclass Chemaclass added the bug Something isn't working label Aug 19, 2026
@Chemaclass Chemaclass self-assigned this Aug 19, 2026
@Chemaclass
Chemaclass merged commit e1b9de0 into main Aug 19, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/1322-bench-aborts-without-tear-down-after-script branch August 19, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant