[vim/vim] Test hangs with E437 Terminal capability cm required, but running test manually works (Issue #14325)

58 views
Skip to first unread message

D. Ben Knoble

unread,
Mar 28, 2024, 10:46:42 AM3/28/24
to vim/vim, Subscribed

Steps to reproduce

  1. Install and launch alacritty 0.13.1
  2. Compile vim, run make test

When the hangup occurs in the error log below (at Test_exitcode, first, AFAICT), I can press Enter and the tests continue running, but I have to keep doing so for several tests, including some which don't use RunVim such as Test_backupskip. I didn't get to the end of the test suite to see if they are reported as failures or not. If I kill the tests, I have to kill all the processes individually to cleanup…

Expected behaviour

The test should not hang. In the past I have gotten warnings like in #11935 (comment); I'm not seeing those now.

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

Version of Vim

9.1.0224

Environment

OS: macOS 14.3
Terminal: Alacritty 0.13.1
$TERM: alacritty
shell: zsh 5.9

Logs and stack traces

make test
[snipped]
00:19 Executing Test_v_event_readonly()
00:19 Executing Test_vim_did_enter()
00:19 Executing Test_win_tab_autocmd()
VIMRUNTIME=../../runtime  ../vim -f  -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_exit.vim --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing Test_/{match($0, "([0-9][0-9]:[0-9][0-9] *)?Executing Test_[^\\)]*\\)"); print substr($0, RSTART, RLENGTH) "\r"; fflush()}'
00:19 Executing Test_exit_code()
E437: Terminal capability "cm" required

---

# thanks to a modified "RunVim" to write out the command being run
#diff --git i/src/testdir/shared.vim w/src/testdir/shared.vim
#index dd2f012c..914ce712 100644
#--- i/src/testdir/shared.vim
#+++ w/src/testdir/shared.vim
#@@ -364,6 +364,8 @@ func RunVimPiped(before, after, arguments, pipecmd)
#   " Optionally run Vim under valgrind
#   " let cmd = 'valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind ' . cmd
# 
#+  call writefile([cmd, args, a:arguments], '/tmp/foo')
#+
#   exe "silent !" .. a:pipecmd .. ' ' ..  cmd .. args .. ' ' .. a:arguments
# 
#   if len(a:before) > 0
nl -b a /tmp/foo
     1	../vim -f  -u NONE --gui-dialog-file guidialog --not-a-term --gui-dialog-file guidialogfile
     2	 --cmd "so Xbefore.vim" -S Xafter.vim
     3	

---

cat src/testdir/Xafter.vim =(echo '===') src/testdir/Xbefore.vim =(echo '===') src/testdir/vimcmd
quit
===
au QuitPre * call writefile(['qp = ' .. v:exiting], 'Xtestout', 'a')
au ExitPre * call writefile(['ep = ' .. v:exiting], 'Xtestout', 'a')
au VimLeavePre * call writefile(['lp = ' .. v:exiting], 'Xtestout', 'a')
au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout', 'a')
===
../vim
VIMRUNTIME=../../runtime  ../vim -f  -u unix.vim --gui-dialog-file guidialog

---

# Running the test myself: no errors, no nothing, just success:
(cd src/testdir && ../vim -f -u NONE --gui-dialog-file guidialog --not-a-term --cmd 'so Xbefore.vim' -S Xafter.vim && cat Xtestout)
qp = v:null
ep = v:null
lp = 0
l = 0


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

D. Ben Knoble

unread,
Mar 28, 2024, 10:49:14 AM3/28/24
to vim/vim, Subscribed

And I should mention: running the built vim with my usual configuration produces no errors.

infocmp alacritty
#	Reconstructed via infocmp from file: /Users/BZT230/.terminfo/61/alacritty
alacritty|alacritty terminal emulator,
	am, bce, ccc, hs, km, mc5i, mir, msgr, npc, xenl,
	colors#256, cols#80, it#8, lines#24, pairs#32767,
	acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
	bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
	clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M,
	csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
	cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
	cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
	dl=\E[%p1%dM, dl1=\E[M, dsl=\E]2;\007, ech=\E[%p1%dX,
	ed=\E[J, el=\E[K, el1=\E[1K, flash=\E[?5h$<100/>\E[?5l,
	fsl=^G, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH,
	ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=^J,
	indn=\E[%p1%dS,
	initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
	invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kDC=\E[3;2~,
	kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D,
	kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE,
	kbs=\177, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
	kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP,
	kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[1;2P,
	kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~,
	kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~,
	kf21=\E[20;2~, kf22=\E[21;2~, kf23=\E[23;2~,
	kf24=\E[24;2~, kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R,
	kf28=\E[1;5S, kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~,
	kf31=\E[18;5~, kf32=\E[19;5~, kf33=\E[20;5~,
	kf34=\E[21;5~, kf35=\E[23;5~, kf36=\E[24;5~,
	kf37=\E[1;6P, kf38=\E[1;6Q, kf39=\E[1;6R, kf4=\EOS,
	kf40=\E[1;6S, kf41=\E[15;6~, kf42=\E[17;6~,
	kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~,
	kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~,
	kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q, kf51=\E[1;3R,
	kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~,
	kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~,
	kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~,
	kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
	kf8=\E[19~, kf9=\E[20~, khome=\EOH, kich1=\E[2~,
	kind=\E[1;2B, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
	kri=\E[1;2A, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El,
	memu=\Em, oc=\E]104\007, op=\E[39;49m, rc=\E8,
	rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, ri=\EM,
	rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B, rmam=\E[?7l,
	rmcup=\E[?1049l\E[23;0;0t, rmir=\E[4l, rmkx=\E[?1l\E>,
	rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m,
	rs1=\Ec\E]104\007, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
	setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
	setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
	setb@, setf@,
	sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
	sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
	smcup=\E[?1049h\E[22;0;0t, smir=\E[4h, smkx=\E[?1h\E=,
	smm=\E[?1034h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
	tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
	u8=\E[?%[;0123456789]c, u9=\E[c, vpa=\E[%i%p1%dd,


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

Christian Brabandt

unread,
Mar 28, 2024, 12:10:11 PM3/28/24
to vim/vim, Subscribed

Hm, and under what terminal did the test fail?


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

D. Ben Knoble

unread,
Mar 28, 2024, 12:12:36 PM3/28/24
to vim/vim, Subscribed

All of this is within Alacritty.


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

Christian Brabandt

unread,
Mar 28, 2024, 12:15:44 PM3/28/24
to vim/vim, Subscribed

and what is :set term? when it fails? I am slightly confused because of this error here: E437: Terminal capability "cm" required, which indicates that the cup capability isn't set.


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

D. Ben Knoble

unread,
Mar 28, 2024, 2:31:51 PM3/28/24
to vim/vim, Subscribed

Good to know that cm -> cup. That's definitely present in the infocmp.

When I run with my personal config, I force term=xterm-256color. When I run a modified version of the -u NONE command where the test executes successfully, term says alacritty, just like it always did when causing those warnings in past builds. I expect it's the same for the failing test, though I can try to add another writefile if you need me to confirm that?


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

D. Ben Knoble

unread,
Mar 28, 2024, 2:34:25 PM3/28/24
to vim/vim, Subscribed

(It's a little hard to debug the test itself, so any tips on that are also appreciated; running just one test file I figured out one time, but killing the hung test is hard, and I'm not sure if I can run the test in a debugger-like environment to step through the vimscript.)


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

Christian Brabandt

unread,
Mar 29, 2024, 5:03:44 AM3/29/24
to vim/vim, Subscribed

I'll try installing alacritty to verify. it seems complicated to get it installed, I have to install the whole buildchain :/


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

Christian Brabandt

unread,
Mar 29, 2024, 5:43:27 AM3/29/24
to vim/vim, Subscribed

I cannot seem to reproduce with alacritty 0.14.0-dev (6585d604) and Vim 9.1.228


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

D. Ben Knoble

unread,
Mar 29, 2024, 9:40:36 AM3/29/24
to vim/vim, Subscribed

Hm. On a different machine (macOS 12.7.2), the tests pass and I get the (expected)

VIMRUNTIME=../../runtime  ../vim -f  -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_exit.vim --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing Test_/{match($0, "([0-9][0-9]:[0-9][0-9] *)?Executing Test_[^\\)]*\\)"); print substr($0, RSTART, RLENGTH) "\r"; fflush()}'
01:27 Executing Test_exit_code()

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'
01:27 Executing Test_exit_error_reading_input()

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'
01:27 Executing Test_exiting()

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_ansi
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_pcansi
    builtin_win32
    builtin_amiga
    builtin_dumb
    builtin_debug
defaulting to 'ansi'

I suppose I could try to bisect on the machine that's failing (or I might try to see if the 4 patches between 224 and 228 made a difference).


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

D. Ben Knoble

unread,
Mar 29, 2024, 1:57:53 PM3/29/24
to vim/vim, Subscribed

Reinstalling alacritty today and building latest master still didn't work. I'll see if I can bisect, but stopping the hang requires me to kill all the test processes for some reason (killing a "parent" doesn't seem to work).


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

D. Ben Knoble

unread,
Mar 29, 2024, 4:20:52 PM3/29/24
to vim/vim, Subscribed

Bisecting didn't reveal any suspects (in fact they all passed by small build-and-test script); I finally tried a make distclean for the failing build and I appear to be getting somewhere. Unfortunately, while I typically get ./configure errors that indicate a distclean is needed, I didn't this time.

If this solves it, I'll close the issue, but it would be nice to know what required the distclean. I believe I was attempting to compile on the failing machine for the first time 9.1.0, though it could have been an OS update, dependency update, or similar in the intervening time that caused the problem.


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

D. Ben Knoble

unread,
Mar 29, 2024, 4:35:43 PM3/29/24
to vim/vim, Subscribed

Closed #14325 as completed.


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/14325/issue_event/12298237481@github.com>

Reply all
Reply to author
Forward
0 new messages