[vim/vim] Test_terminal_qall_prompt Failed (Issue #10530)

22 views
Skip to first unread message

Philip H.

unread,
Jun 6, 2022, 6:09:49 AM6/6/22
to vim/vim, Subscribed

Steps to reproduce

use Arch Linux PKGBUILD
build it with makepkg -src or chrootbuild

Expected behaviour

no test failed like on upstream (here)

Version of Vim

8.2.5062-1

Environment

gh Action ubuntu-latest
manjaro-chrootbuild

Logs and stack traces

Failures: 
	From test_terminal.vim:
	Found errors in Test_terminal_qall_prompt():
	Run 1:
	command line..script /build/vim/src/vim-8.2.5062/src/testdir/runtest.vim[459]..function RunTheTest[44]..Test_terminal_qall_prompt[6]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>133 line 1: Pattern '\\[running]' does not match '<r@fv-az82-486:/build/vim/src/vim-8.2.5062/src/testdir]  0,0-1          All'
	Run 2:
	command line..script /build/vim/src/vim-8.2.5062/src/testdir/runtest.vim[492]..function RunTheTest[44]..Test_terminal_qall_prompt[6]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>138 line 1: Pattern '\\[running]' does not match '<r@fv-az82-486:/build/vim/src/vim-8.2.5062/src/testdir]  0,0-1          All'
	Run 3:
	command line..script /build/vim/src/vim-8.2.5062/src/testdir/runtest.vim[492]..function RunTheTest[44]..Test_terminal_qall_prompt[6]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>143 line 1: Pattern '\\[running]' does not match '<r@fv-az82-486:/build/vim/src/vim-8.2.5062/src/testdir]  0,0-1          All'
	Run 4:
	command line..script /build/vim/src/vim-8.2.5062/src/testdir/runtest.vim[492]..function RunTheTest[44]..Test_terminal_qall_prompt[6]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>148 line 1: Pattern '\\[running]' does not match '<r@fv-az82-486:/build/vim/src/vim-8.2.5062/src/testdir]  0,0-1          All'
	Run 5:
	command line..script /build/vim/src/vim-8.2.5062/src/testdir/runtest.vim[492]..function RunTheTest[44]..Test_terminal_qall_prompt[6]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>153 line 1: Pattern '\\[running]' does not match '<r@fv-az82-486:/build/vim/src/vim-8.2.5062/src/testdir]  0,0-1          All'
	Flaky test failed too often, giving up
TEST FAILURE
make[2]: Leaving directory '/build/vim/src/vim-8.2.5062/src/testdir'
make[1]: Leaving directory '/build/vim/src/vim-8.2.5062/src'


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530@github.com>

Bram Moolenaar

unread,
Jun 6, 2022, 6:18:50 AM6/6/22
to vim...@googlegroups.com, Philip H.

> ### Steps to reproduce
>
> use Arch Linux PKGBUILD
> build it with makepkg -src or chrootbuild
>
> ### Expected behaviour
>
> no test failed like on upstream (here)
>
> ### Version of Vim
>
> 8.2.5062-1
>
> ### Environment
>
> gh Action ubuntu-latest
> manjaro-chrootbuild
>
> ### Logs and stack traces
>
> ```shell
> Failures:
> From test_terminal.vim:
> Found errors in Test_terminal_qall_prompt():
> Run 1:
> command line..script /build/vim/src/vim-8.2.5062/src/testdir/runtest.vim[459]..function RunTheTest[44]..Test_terminal_qall_prompt[6]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>133 line 1: Pattern '\\[running]' does not match '<r@fv-az82-486:/build/vim/src/vim-8.2.5062/src/testdir] 0,0-1 All'

It passes on other systems. Any idea what is different about Arch
Linux? You could try adding some sleeps in that test so see if that
helps.


--
It's not hard to meet expenses, they're everywhere.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Philip H.

unread,
Jun 6, 2022, 6:25:57 AM6/6/22
to vim/vim, Subscribed

only possible to build if test is disabled


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1147296862@github.com>

Philip H.

unread,
Jun 6, 2022, 3:00:04 PM6/6/22
to vim/vim, Subscribed

happend on 8.2.5055 and up but not on 8.2.5054


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1147784558@github.com>

Bram Moolenaar

unread,
Jun 6, 2022, 4:15:42 PM6/6/22
to vim/vim, Subscribed


> happend on 8.2.5055 and up but not on 8.2.5054

The only thing that patch 8.2.5055 does is to make sure the statusline
gets updated.

What is the value of $SHELL when running the tests?
Even when it's a very long string the "[running]" should still show up.
Could you add a "sleep 10" after the point where the test fails, to see
what the screen looks like?

--
ARTHUR: Did you say shrubberies?
ROGER: Yes. Shrubberies are my trade. I am a shrubber. My name is Roger
the Shrubber. I arrange, design, and sell shrubberies.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\

/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1147874857@github.com>

Philip H.

unread,
Jun 7, 2022, 4:51:27 AM6/7/22
to vim/vim, Subscribed

CC @foutrelis


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1148384876@github.com>

Philip H.

unread,
Jun 8, 2022, 10:06:09 AM6/8/22
to vim/vim, Subscribed

@brammool https://github.com/pheiduck/vim-git/runs/6794225556?check_suite_focus=true


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1149965061@github.com>

Philip H.

unread,
Jun 9, 2022, 9:34:02 AM6/9/22
to vim/vim, Subscribed

What is the value of $SHELL when running the tests?

bash / xterm


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1151126513@github.com>

Philip H.

unread,
Jun 14, 2022, 7:04:23 AM6/14/22
to vim/vim, Subscribed

btw, the test is tried 6 times but failed anyway on my Environment


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155036113@github.com>

Christian Brabandt

unread,
Jun 14, 2022, 7:53:53 AM6/14/22
to vim/vim, Subscribed

build it with makepkg -src or chrootbuild

Could that be, that $SHELL is different in your chroot env?

If I look at this:

command line..script /build/vim/src/vim-8.2.5062/src/testdir/runtest.vim[492]..function RunTheTest[44]..Test_terminal_qall_prompt[6]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>153 line 1: Pattern '\\[running]' does not match '<r@fv-az82-486:/build/vim/src/vim-8.2.5062/src/testdir]  0,0-1          All'

I wonder where the path/filename section is coming from. What happens if you run the self-compiled vim inside your chroot and run :term? What does the statusline show? From that statusline I would think that no terminal is inside that window active.
Not sure if it could happen when running the test suite, but could your statusline be set or be overridden, e.g. by a statusline plugin?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155082641@github.com>

Evangelos Foutras

unread,
Jun 14, 2022, 9:08:57 AM6/14/22
to vim/vim, Subscribed

I can reproduce the term status line both inside and outside of a chroot. I built vim 8.2.5088 on Arch (with skipped tests) and installed the resulting package. :term spawns a shell but in the middle of the screen there's a green status line saying:

!/bin/bash [foutrelis@notbad:~/desktop/vim/trunk]                              0,0-1          All

If I cd to another directory in the spawned shell, the status line is updated with the new path.

After rolling back to 8.2.5046, :term gives:

!/bin/bash [running]                                                           0,0-1          All


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155163132@github.com>

Evangelos Foutras

unread,
Jun 14, 2022, 9:27:41 AM6/14/22
to vim/vim, Subscribed

Seems the behavior we're seeing comes from the system-wide /etc/bash.bashrc. It sets PROMPT_COMMAND to a value that updates the window title to include information about the current directory.

You should be able to reproduce this with bash using:

PROMPT_COMMAND='printf "\033]0;catdog\007"' vim

I'm thinking specifying a fixed PROMPT_COMMAND value for Test_terminal_qall_prompt would fix this and make the test more robust.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155186580@github.com>

Bram Moolenaar

unread,
Jun 14, 2022, 10:01:04 AM6/14/22
to vim/vim, Subscribed


> I can reproduce the term status line both inside and outside of a
> chroot. I built vim 8.2.5088 on Arch (with skipped tests) and
> installed the resulting package. `:term` spawns a shell but in the
> middle of the screen there's a green status line saying:
>
> ```
> !/bin/bash ***@***.***:~/desktop/vim/trunk] 0,0-1 All

> ```
>
> If I `cd` to another directory in the spawned shell, the status line
> is updated with the new path.
>
> After rolling back to 8.2.5046, `:term` gives:
>
> ```
> !/bin/bash [running] 0,0-1 All
> ```

It appears that the shell itself is setting the window title. This then
ends up in tl_title and gets displayed instead of the job status.

It should be possible to disable this with:
test_override('vterm_title', 1)

I'll make a patch for that. If that doesn't fix the problem, please
reopen the issue.

--
A parent can be arrested if his child cannot hold back a burp during a church
service.
[real standing law in Nebraska, United States of America]


/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155226908@github.com>

Bram Moolenaar

unread,
Jun 14, 2022, 10:01:13 AM6/14/22
to vim/vim, Subscribed

Closed #10530 as completed via e564c70.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/10530/issue_event/6804675280@github.com>

Philip H.

unread,
Jun 14, 2022, 10:36:27 AM6/14/22
to vim/vim, Subscribed

still present for me: https://github.com/pheiduck/vim-git/runs/6882240944?check_suite_focus=true#step:7:15147


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155281211@github.com>

Bram Moolenaar

unread,
Jun 14, 2022, 11:07:18 AM6/14/22
to vim/vim, Subscribed
I cannot see any reason why this happens. The only way to get this kind
of status is by setting tl_title, and that has now been made impossible.
Can you run this in a debugger for this environment?

--
Beer & pretzels can't be served at the same time in any bar or restaurant.
[real standing law in North Dakota, United States of America]


/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155320858@github.com>

Evangelos Foutras

unread,
Jun 14, 2022, 2:14:42 PM6/14/22
to vim/vim, Subscribed

I get the same error when running the test suite (vim version 8.2.5094). However, using call test_override('vterm_title', 1) in a regular vim instance makes :term show [running]. Not sure why it doesn't work for the test though.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155533189@github.com>

Evangelos Foutras

unread,
Jun 14, 2022, 2:30:51 PM6/14/22
to vim/vim, Subscribed

This seems to fix the test but I can't judge its correctness (just copied how :term is sent to vim):

--- src/vim-8.2.5094/src/testdir/test_terminal.vim.orig	2022-06-14 18:14:53.000000000 +0000
+++ src/vim-8.2.5094/src/testdir/test_terminal.vim	2022-06-14 18:14:53.000000000 +0000
@@ -1219,10 +1219,11 @@ endfunc
 func Test_terminal_qall_prompt()
   CheckRunVimInTerminal
 
-  " the shell may set the window title, we don't want that here
-  call test_override('vterm_title', 1)
   let buf = RunVimInTerminal('', {})
 
+  " the shell may set the window title, we don't want that here
+  call term_sendkeys(buf, ":call test_override('vterm_title', 1)\<CR>")
+
   " Open a terminal window and wait for the prompt to appear
   call term_sendkeys(buf, ":term\<CR>")
   call WaitForAssert({-> assert_match('\[running]', term_getline(buf, 10))})
@@ -1236,7 +1237,6 @@ func Test_terminal_qall_prompt()
 
   " close the terminal window where Vim was running
   quit
-  call test_override('ALL', 0)
 endfunc
 
 " Run Vim in a terminal, then start a terminal window with a shell and check


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155581618@github.com>

Bram Moolenaar

unread,
Jun 14, 2022, 2:54:18 PM6/14/22
to vim/vim, Subscribed


> I get the same error when running the test suite (vim version
> 8.2.5094). However, using `call test_override('vterm_title', 1)` in a

> regular vim instance makes `:term` show `[running]`. Not sure why it
> doesn't work for the test though.

I think the problem is that the test override is set in the current Vim
instance, but the test is run in another one. I'll make a patch...

--
No man may purchase alcohol without written consent from his wife.
[real standing law in Pennsylvania, United States of America]


/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155600809@github.com>

Evangelos Foutras

unread,
Jun 14, 2022, 3:05:40 PM6/14/22
to vim/vim, Subscribed

I think there's an error in 99f4b6e -- it does :test_override instead of :call test_override.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155610131@github.com>

Bram Moolenaar

unread,
Jun 14, 2022, 4:26:08 PM6/14/22
to vim/vim, Subscribed


> I think there's an error in https://github.com/vim/vim/commit/99f4b6e0824b339510aaaa0bb81c50f5866f6be1 -- it does `:test_override` instead of `:call test_override`.

Using Vim9 script makes me forget "call"...

I wonder if we can call a function without "call" in legacy script. For
when the command isn't recognized perhaps.

--
Lawmakers made it obligatory for everybody to take at least one bath
each week -- on Saturday night.
[real standing law in Vermont, United States of America]


/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10530/1155678254@github.com>

Reply all
Reply to author
Forward
0 new messages