Skip to content

fix(functional-tests): avoid unbound CARGO_ARGS under set -u#109

Merged
prajwolrg merged 1 commit into
mainfrom
fix/run-test-empty-cargo-args
May 20, 2026
Merged

fix(functional-tests): avoid unbound CARGO_ARGS under set -u#109
prajwolrg merged 1 commit into
mainfrom
fix/run-test-empty-cargo-args

Conversation

@prajwolrg
Copy link
Copy Markdown
Collaborator

Description

functional-tests/run_test.sh runs under set -u. For the native backend, CARGO_ARGS=() is an empty array, and on bash 3.2 (still the default /bin/bash on macOS) expanding "${CARGO_ARGS[@]}" under set -u errors out with unbound variable, so the script aborts before invoking cargo build.

Switched the expansion to the standard ${CARGO_ARGS[@]+"${CARGO_ARGS[@]}"} idiom, which expands only when the array is set. No behavior change on bash 4+/5+ or for the sp1 backend.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Notes to Reviewers

Single-line shell change. Reproducible on macOS by running ./run_test.sh with the default ASM_PROVER_BACKEND=native.

Checklist

  • I have performed a self-review of my code.
  • My changes do not introduce new warnings.

Related Issues

N/A

`run_test.sh` runs with `set -u`. Expanding `"${CARGO_ARGS[@]}"` for an
empty array triggers "unbound variable" on bash 3.2 (the default shell
on macOS), so the native backend path failed before invoking cargo. Use
the `${arr[@]+"${arr[@]}"}` idiom to expand only when the array is set.
@prajwolrg prajwolrg marked this pull request as ready for review May 20, 2026 10:19
@prajwolrg
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

Commit: 4cee9e2
SP1 Execution Results

program cycles gas
asm-stf 130,127,169 129,751,742
moho 5,191,380 5,499,715

@prajwolrg prajwolrg enabled auto-merge May 20, 2026 11:21
@prajwolrg prajwolrg added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 1b545ed May 20, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants