Skip to content

test(terminal): run the tests that touch no process-wide state in parallel - #813

Merged
omartelo merged 1 commit into
mainfrom
test/terminal-parallel
Oct 17, 2026
Merged

omartelo merged 1 commit into
mainfrom
test/terminal-parallel

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

With relay parallel (#812), internal/terminal is the floor of the Linux and macOS backend suites (24s and 29s in the #812 run) and 42s on Windows.

  • 472 of the 591 tests now call t.Parallel() as their first line. Nothing else changes in them.
  • 117 stay serial because they touch process-wide state: t.Setenv/os.Setenv directly or through one of the 18 helpers that do (writeTranscript, profileMachine, xdgMachine, conversationHome…).
  • pty_windows_test.go and entrypoint_windows_test.go stay serial on purpose: they close a ConPTY session by Ctrl+C through the console, which can't be validated in parallel off a Windows machine.

Measured on Linux at GOMAXPROCS=4, three runs: 24s → 14s. -race -count=20 at 4 procs and -count=20 -parallel=64 at 2 procs (starved on purpose), ~9,400 executions each: no failure, no race. go vet clean for linux, windows and darwin. Darwin-only test files are only exercised by this PR's macOS job.

@omartelo
omartelo merged commit e37e41f into main Oct 17, 2026
7 checks passed
@omartelo
omartelo deleted the test/terminal-parallel branch October 17, 2026 19:47
omartelo added a commit that referenced this pull request Oct 17, 2026
…d a freed port, serially

#813 ran them in parallel. A test that writes a script and execs it fails
with ETXTBSY when another test forks while the script is still open for
writing (golang/go#22315), and the port-retry test can lose its freed port
to a parallel test's 127.0.0.1:0. Measured on the package: 1 failure in 15
runs before, 0 in 25 after.
omartelo added a commit that referenced this pull request Oct 17, 2026
…ve first launch (#816)

* fix(ci): switch the release e2e back to the web window after the native first launch

The first launch of a release opens the native window since #809, and the
macOS and Windows end-to-end checks expected the web one on it.

* fix(ci): wait for the native window to attach before the e2e switches back

On the slower Intel runner the switch came before the native window had
attached, so lich had no window of it to close and both stayed open. lich now
logs the attach, and the macOS and Windows checks wait for it.

* test(terminal): run the tests that exec a script they wrote, or rebind a freed port, serially

#813 ran them in parallel. A test that writes a script and execs it fails
with ETXTBSY when another test forks while the script is still open for
writing (golang/go#22315), and the port-retry test can lose its freed port
to a parallel test's 127.0.0.1:0. Measured on the package: 1 failure in 15
runs before, 0 in 25 after.
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.

1 participant