Skip to content

Deploy shell tests stop on macOS (BSD sed in #701's OIDC cases; two bash 3.2 stops) #720

Closed

Description

@webchang

Summary

Three deploy shell tests stop before finishing when run on macOS (they pass on Linux CI). Found while running the test suites on macOS after syncing a fork to main at dd0ce71.

Test Shell Where it stops Cause
deploy/vm/tests/setup-vm.test.sh bash 5 (Homebrew) the OIDC cases added in #701 (294054a) sed: 1: "…": invalid command code f: two sed -i '/^…=/d' FILE lines. BSD sed reads the next word after -i as the backup suffix. The file's other sed -i lines already use the portable sed -i.bak … && rm -f ….bak form.
deploy/vm/tests/setup-vm.test.sh bash 3.2 (macOS's /bin/bash) line 338 mapfile: command not found (mapfile is bash 4+), in the settings-key check from b2bf8dd.
deploy/microvm/tests/build-snapshot.test.sh bash 3.2 line 1319 vfs_out: unbound variable, in the virtio-fs preflight's scenarios (2b328a6). The cause isn't established yet.

Proposed

  • feat: generic OIDC identity provider (w3id) behind the login seam #701's two sed -i lines: use the file's own portable form. A PR follows: two lines, test-only; setup-vm.sh is unchanged. With it, setup-vm.test.sh gives 106 ok and 0 not ok on macOS with bash 5.
  • The two bash 3.2 stops: either make the tests bash-3.2-safe (while read loops instead of mapfile, and a look at line 1319), or state that the deploy tests need bash 4+ (e.g. a version check at the top that says so). Happy to send either, whichever the maintainers prefer.

How to reproduce

On macOS, from a checkout of main:

bash deploy/vm/tests/setup-vm.test.sh                  # bash 5 on PATH: stops at the OIDC sed lines
/bin/bash deploy/vm/tests/setup-vm.test.sh             # bash 3.2: stops at line 338 (mapfile)
/bin/bash deploy/microvm/tests/build-snapshot.test.sh  # bash 3.2: stops at line 1319 (vfs_out)

Activity

  1. webchang commented on Nov 12, 2026

    @webchang
    MemberAuthor

    A note on CI coverage, since deploy-scripts-bash32 passes on #725.

    That job runs make test-deploy-bash32, which covers three tests chosen as bash-3.2-safe: deploy/k8s/tests/setup.test.sh, deploy/k8s/tests/smoke.test.sh and deploy/microvm/tests/setup-microvm.test.sh. The two bash 3.2 stops reported here are in tests outside that list: deploy/vm/tests/setup-vm.test.sh and deploy/microvm/tests/build-snapshot.test.sh. Their Linux runs use bash 5 and GNU sed, so neither the bash 3.2 stops nor the BSD-sed issue can show up in CI today.

    So the open choice for these two tests is: make them 3.2-safe and add them to the target, or state that they need bash 4+ and GNU-compatible tools. #725 fixes only the sed lines, which are correct under both.

  2. webchang commented on Nov 12, 2026

    @webchang
    MemberAuthor

    An update. The BSD-sed stop is fixed on main: #717's merge (e1d57b6) changed the two OIDC lines to sed -i.bak … && rm -f ….bak. With it, setup-vm.test.sh passes on macOS with bash 5. So #725 is closed as superseded.

    Still open on main at d15b807 under macOS's bash 3.2:

    • deploy/vm/tests/setup-vm.test.sh stops at mapfile: command not found;
    • deploy/microvm/tests/build-snapshot.test.sh stops in its vfs_out scenarios.

    The question from the issue stands: make these two 3.2-safe and add them to test-deploy-bash32, or state that they need bash 4+.

    Assisted-By: Claude Code

  3. added a commit that references this issue on Nov 16, 2026
    b9f3218
  4. added this to the v0.11.0 milestone on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions