[vim/vim] test suite is slow because it cannot run in parallel (PR #20094)

9 views
Skip to first unread message

Jesse Rosenstock

unread,
Apr 29, 2026, 9:18:00 AMApr 29
to vim/vim, Subscribed

Problem: The test suite takes over 17 minutes serially and cannot
be run with make -j because tests share the testdir/
working directory and create temporary files with
well-known names (X*, test.log, messages, vimcmd).
Solution: Create per-test isolated working directories under
workdir/ using symlink trees that mirror the real
directory layout, keeping temp files isolated while
preserving all relative path assumptions.
(Jesse Rosenstock)

Each test runs in workdir/$test/testdir/ where the symlink tree preserves relative-path depth: ../ resolves to src/ contents and ../../ resolves to the vim root. The layout is:

workdir/ symlinks to vim root (runtime/, ...)
workdir/$test/ symlinks to src/ contents
workdir/$test/testdir/ symlinks to testdir/ contents, test cwd

Level-1 symlinks are created once in the nolog target rather than per-test, because ln -s follows existing symlinks to directories (creating e.g. runtime/runtime in the repo root) and there is no race-free way to create them from parallel test processes. A setup_workdir.sh POSIX shell script creates the per-test levels 2 and 3.

The Makefile avoids GNU Make extensions to stay POSIX-compatible: setup_workdir.sh replaces a define/call macro, shell TESTDIR=pwd replaces $(CURDIR), and recursive $(MAKE) replaces order-only prerequisites (|).

The test_stacktrace.vim Filepath() function is updated to use getcwd() for Xscript files since they are created in the workdir cwd, while runtest.vim is resolved from the original testdir.

An alternative approach would eliminate the symlink tree entirely by rewriting all ~127 relative path references (../ and ../../) across 35 test files to use absolute paths via g:testdir. This was rejected because: (1) it touches many files unrelated to the parallelism fix, creating review noise and merge conflicts; (2) tab-completion and fnamemodify tests genuinely test relative path resolution against real directory structure, requiring per-test fixture directories anyway; (3) future test authors must remember to avoid ../ in favor of g:testdir, an easy regression with no enforcement mechanism; and (4) the symlink approach preserves the natural relative-path idiom that existing tests use, keeping the diff focused on infrastructure.

On a 48-core machine, wall clock time drops from 17m32s to ~50s.

This supersedes 6146f33 / #20082 (patch 9.2.0410: test suite races when run with parallel make) which added .NOTPARALLEL as a workaround for the same race conditions.

related: #20082


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20094

Commit Summary

  • 277ae86 test suite is slow because it cannot run in parallel

File Changes

(6 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20094@github.com>

Jesse Rosenstock

unread,
Apr 29, 2026, 10:04:59 AMApr 29
to vim/vim, Push

@jmr pushed 1 commit.

  • 781e64e test suite is slow because it cannot run in parallel


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20094/before/277ae86d5e3fd75ee91641deb25bd46902530a41/after/781e64e48a7f0f2775de620e47bef723bd8e2ef2@github.com>

Jesse Rosenstock

unread,
Apr 29, 2026, 11:33:34 AMApr 29
to vim/vim, Push

@jmr pushed 1 commit.

  • 20f2db5 test suite is slow because it cannot run in parallel


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20094/before/1454912488b861efe8930965e70739659ab1e242/after/20f2db53770f10368fd922740583742dfbe276ab@github.com>

Jesse Rosenstock

unread,
Apr 30, 2026, 3:28:04 AMApr 30
to vim/vim, Push

@jmr pushed 1 commit.

  • 30a7be6 test suite is slow because it cannot run in parallel


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20094/before/20f2db53770f10368fd922740583742dfbe276ab/after/30a7be682f19d65055e7a2642b217c9af73c5f0b@github.com>

Jesse Rosenstock

unread,
May 4, 2026, 2:50:20 AMMay 4
to vim/vim, Push

@jmr pushed 1 commit.

  • 96ee796 test suite is slow because it cannot run in parallel


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20094/before/30a7be682f19d65055e7a2642b217c9af73c5f0b/after/96ee796124d1665c2deb5195c1cbe92c97ffea98@github.com>

Christian Brabandt

unread,
Jun 13, 2026, 4:07:41 PM (10 hours ago) Jun 13
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20094)

this has stalled, so closing


Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20094/c4699645633@github.com>

Reply all
Reply to author
Forward
0 new messages