[vim/vim] client-server test fails without X11 server (PR #20716)

4 views
Skip to first unread message

MURAOKA Taro

unread,
Jul 5, 2026, 9:37:03 AM (17 hours ago) Jul 5
to vim/vim, Subscribed

Problem: When unable to connect to X11, serverlist({'list':1}) returns a string instead of a list. This causes Test_remote_serverlist() in test_vim9_builtin.vim to fail.

Solution: Raise E240 (No connection to the X server)

Additionally, This fix Test_clientserver_env_method() keeping VIM_CLIENTSERVER environment variable instead of deleting it. This allows certain +clientserver tests to pass, even in environments where the X11 server is unavailable, provided that VIM_CLIENTSERVER=socket is set.


This replace #20709


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

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

Commit Summary

  • d1d3a07 client-server test fails without X11 server

File Changes

(2 files)

Patch Links:


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/20716@github.com>

MURAOKA Taro

unread,
Jul 5, 2026, 9:44:34 AM (17 hours ago) Jul 5
to vim/vim, Subscribed
koron left a comment (vim/vim#20716)

Some tests failed.
I make this as draft.


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/20716/c4886254440@github.com>

MURAOKA Taro

unread,
Jul 5, 2026, 10:38:26 AM (16 hours ago) Jul 5
to vim/vim, Subscribed
koron left a comment (vim/vim#20716)

https://github.com/vim/vim/actions/runs/28743705843/job/85230850007

A test failed, but it is unrelated to this PR.

Executed:  7767 Tests
 Skipped:  1029 Tests
  FAILED:     1 Tests


Failures: 
	From test_plugin_glvs.vim:
	Found errors in Test_glvs_pwsh_vba_gz():
	Caught exception in Test_glvs_pwsh_vba_gz(): Vim(read):E485: Can't read file C:/Users/RUNNER~1/AppData/Local/Temp/VF3FCD0.tmp @ command line..script D:/a/vim/vim/src2/testdir/runtest.vim[636]..function RunTheTest[63]..Test_glvs_pwsh_vba_gz[10]..getscript#GetLatestVimScripts[133]..<SNR>10_GetOneScript, line 88


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/20716/c4886407827@github.com>

James McCoy

unread,
Jul 5, 2026, 4:20:50 PM (11 hours ago) Jul 5
to vim/vim, Subscribed
jamessan left a comment (vim/vim#20716)

Raise E240 (No connection to the X server)

Test_remote_serverlist needs to catch this error, otherwise the test will fail for that reason, rather than getting a string when a list was expected.


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/20716/c4887466632@github.com>

MURAOKA Taro

unread,
Jul 5, 2026, 8:39:32 PM (6 hours ago) Jul 5
to vim/vim, Subscribed
koron left a comment (vim/vim#20716)

Test_remote_serverlist needs to catch this error, otherwise the test will fail for that reason.

This PR makes the test to fail with the right reasons. Therefore, I believe the patch is unnecessary.

Comparing the error details from running the test before and after this PR yields the following results.
Before this PR, the error was seemingly nonsensical—indicating a mismatch in the numeric value representing the Vim type. After the PR, the error explicitly states that a connection to X11 cannot be established (E240).

Before:

From test_vim9_builtin.vim:
Executed Test_remote_serverlist()                  in   0.001065 seconds
Filtered 487 tests with $TEST_FILTER and $TEST_SKIP_PAT
Executed 1 test                          in   0.014615 seconds
1 FAILED:
Found errors in Test_remote_serverlist():
command line..script /home/koron/work/vim/kaoriya/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_remote_serverlist line 8: Expected 3 but got 1

After:

From test_vim9_builtin.vim:
Executed Test_remote_serverlist()                  in   0.001087 seconds
Filtered 487 tests with $TEST_FILTER and $TEST_SKIP_PAT
Executed 1 test                          in   0.014922 seconds
1 FAILED:
Found errors in Test_remote_serverlist():
Caught exception in Test_remote_serverlist(): Vim(call):E240: No connection to the X server @ command line..script /home/koron/work/vim/kaoriya/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_remote_serverlist, line 5


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/20716/c4888193603@github.com>

James McCoy

unread,
Jul 5, 2026, 9:56:08 PM (5 hours ago) Jul 5
to vim/vim, Subscribed
jamessan left a comment (vim/vim#20716)

If there's no X available, that shouldn't cause the test to fail. X won't always be available during test. That's not a test failure, though. It's a test being run in an environment where it can never succeed.

Either the test should ignore that specific failure, as I proposed, or the test should be skipped. I didn't suggest skipping it because there are other parts of that test case that don't rely on X.


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/20716/c4888469688@github.com>

MURAOKA Taro

unread,
12:14 AM (3 hours ago) 12:14 AM
to vim/vim, Subscribed
koron left a comment (vim/vim#20716)

I think the real problem is that this test appears to succeed when we can't connect to X11—or more precisely, when the client-server functionality isn't working correctly.


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/20716/c4889007592@github.com>

Reply all
Reply to author
Forward
0 new messages