Skip to content

fix(test): fix Tcl quoting in RunInteractive and openboot isolation in FirstTimeUser#94

Merged
fullstackjam merged 1 commit into
mainfrom
fix/interactive-tcl-quoting-and-isolation
May 19, 2026
Merged

fix(test): fix Tcl quoting in RunInteractive and openboot isolation in FirstTimeUser#94
fullstackjam merged 1 commit into
mainfrom
fix/interactive-tcl-quoting-and-isolation

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

Summary

Fix 1 — RunInteractive Tcl quoting (testutil/machost.go)

shellescape() produces POSIX single-quote escaping ('cmd'), but Tcl does not treat ' as a quoting character — it splits on whitespace, so spawn bash -c 'cmd with spaces' becomes bash -c 'cmd with + spaces' as separate args. Bash then receives a fragmented script and reports unexpected EOF while looking for matching quote.

Fix: replace shellescape with tclBrace which wraps the command in Tcl brace quotes {cmd}, making it a single word with no substitution. Falls back to Tcl double-quote escaping if the command contains { or }.

Fix 2 — TestVM_Journey_FirstTimeUser isolation (vm_user_journey_test.go)

TestVM_Interactive_InstallScript installs openboot via brew install, leaving /opt/homebrew/bin/openboot on the runner. The next test (FirstTimeUser) then fails bare_system_has_no_openboot because which openboot finds it.

Fix: add openboot to the brew uninstall call at the start of FirstTimeUser setup.

Test plan

  • CI green
  • Trigger vm-e2e-spike and confirm TestVM_Interactive_InstallScript runs (no SKIP, no FAIL) and FirstTimeUser passes

…n FirstTimeUser

RunInteractive was using shellescape() (POSIX single-quote escaping) to
quote the spawn command in the expect script. Tcl does not treat ' as a
quoting character, so the command was split on whitespace and bash received
fragmented args — causing 'unexpected EOF while looking for matching quote'.
Fix: use Tcl brace quoting {cmd} so the entire string is one Tcl word.

TestVM_Journey_FirstTimeUser/bare_system_has_no_openboot was failing because
TestVM_Interactive_InstallScript installs openboot via brew on the same host,
and the next test finds it with 'which openboot'. Fix: add openboot to the
brew uninstall call at the start of FirstTimeUser setup.
@github-actions github-actions Bot added the tests Tests only label May 19, 2026
@fullstackjam fullstackjam merged commit 3175a94 into main May 19, 2026
11 checks passed
@fullstackjam fullstackjam deleted the fix/interactive-tcl-quoting-and-isolation branch May 19, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant