James McCoy wrote:
> I'm seeing another test failure in Debian's build environment, which
> seems to again be related to vim not running attached to a tty. I've
> been seeing this since at least 8.1.0549 and the below run is with
> 8.1.0687.
>
> This line
>
> call feedkeys("ix\<esc>", 'tnix')
>
> in Test_edit_forbidden() gets stuck waiting on input from the user.
>
> The make process that's running the tests has stdin pointed to /dev/null
> and stdout/stderr pointed to a pipe.
>
> lrwx------ 1 jamessan jamessan 64 Jan 4 08:05 0 -> /dev/null
> l-wx------ 1 jamessan jamessan 64 Jan 4 08:05 1 -> pipe:[1995567]
> l-wx------ 1 jamessan jamessan 64 Jan 4 08:05 2 -> pipe:[1995567]
>
> 18728 ? S 0:00 \_ /usr/bin/make -j1
> -C src/vim-basic test
> 18933 ? S 0:00 \_ /bin/sh -c cd
> testdir; /usr/bin/make -f Makefile VIMPROG=../vim SCRIPTSOURCE=../../runtime
> 18934 ? S 0:00 \_
> /usr/bin/make -f Makefile VIMPROG=../vim SCRIPTSOURCE=../../runtime
> 20828 ? S 0:00 \_
> /bin/sh -c VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u
> unix.vim -U NONE --noplugin --not-a-term -S runtest.vim test_edit.vim
> 20829 ? R 0:35 \_
> ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -S runtest.vim
> test_edit.vim --cmd au SwapExists * let v:swapchoice = "e"
>
> The backtrace at the time of the hang is
>
> (gdb) bt
> #0 0x00007f85993963c7 in __GI___select (nfds=1, readfds=0x55d62f3abfc0
> <rfds>, writefds=0x55d62f3ac040 <wfds>, exceptfds=0x55d62f3ac0c0 <efds>,
> timeout=0x7ffdd16f6e50) at ../sysdeps/unix/sysv/linux/select.c:41
> #1 0x000055d62f21ac12 in RealWaitForChar (fd=0, msec=0, check_for_gpm=0x0,
> interrupted=0x0) at os_unix.c:6272
> #2 0x000055d62f21a7ca in mch_breakcheck (force=0) at os_unix.c:5914
> #3 0x000055d62f2cc949 in ui_breakcheck_force (force=0) at ui.c:423
> #4 0x000055d62f2cc905 in ui_breakcheck () at ui.c:395
> #5 0x000055d62f195f06 in vgetorpeek (advance=1) at getchar.c:2072
> #6 0x000055d62f195724 in vgetc () at getchar.c:1626
> #7 0x000055d62f195c2c in safe_vgetc () at getchar.c:1830
> #8 0x000055d62f0faf72 in edit (cmdchar=105, startln=0, count=1) at edit.c:803
> #9 0x000055d62f1f1e1a in invoke_edit (cap=0x7ffdd16f7200, repl=0, cmd=105,
> startln=0) at normal.c:9238
> #10 0x000055d62f1f1d96 in nv_edit (cap=0x7ffdd16f7200) at normal.c:9208
> #11 0x000055d62f1e302c in normal_cmd (oap=0x7ffdd16f7280, toplevel=1) at
> normal.c:1121
> #12 0x000055d62f162e5a in exec_normal (was_typed=1, use_vpeekc=0,
> may_use_terminal_loop=1) at ex_docmd.c:10509
> #13 0x000055d62f124141 in f_feedkeys (argvars=0x7ffdd16f7710,
> rettv=0x7ffdd16f78f0) at evalfunc.c:3648
> #14 0x000055d62f11f72a in call_internal_func (name=0x55d630f72570 "feedkeys",
> argcount=2, argvars=0x7ffdd16f7710, rettv=0x7ffdd16f78f0) at evalfunc.c:1084
> #15 0x000055d62f2d82db in call_func (funcname=0x55d630fb4810 "feedkeys",
> len=8, rettv=0x7ffdd16f78f0, argcount_in=2, argvars_in=0x7ffdd16f7710,
> argv_func=0x0, firstline=1, lastline=1, doesrange=0x7ffdd16f78b8,
> evaluate=1, partial=0x0, selfdict_in=0x0) at userfunc.c:1507
> #16 0x000055d62f2d5f1b in get_func_tv (name=0x55d630fb4810 "feedkeys", len=8,
> rettv=0x7ffdd16f78f0, arg=0x7ffdd16f78c0, firstline=1, lastline=1,
> doesrange=0x7ffdd16f78b8, evaluate=1, partial=0x0, selfdict=0x0)
> at userfunc.c:455
> #17 0x000055d62f2dc3b9 in ex_call (eap=0x7ffdd16f79e0) at userfunc.c:3171
> #18 0x000055d62f1545fb in do_one_cmd (cmdlinep=0x7ffdd16f7c20, sourcing=1,
> cstack=0x7ffdd16f7d10, fgetline=0x55d62f2dc827 <get_func_line>,
> cookie=0x55d630f80500) at ex_docmd.c:2525
> #19 0x000055d62f151a32 in do_cmdline (cmdline=0x0, fgetline=0x55d62f2dc827
> <get_func_line>, cookie=0x55d630f80500, flags=7) at ex_docmd.c:1036
> #20 0x000055d62f2d7217 in call_user_func (fp=0x55d630fab260, argcount=0,
> argvars=0x7ffdd16f8890, rettv=0x7ffdd16f8a70, firstline=1, lastline=1,
> selfdict=0x0) at userfunc.c:954
> #21 0x000055d62f2d8241 in call_func (funcname=0x55d630f771b0
> "Test_edit_forbidden", len=19, rettv=0x7ffdd16f8a70, argcount_in=0,
> argvars_in=0x7ffdd16f8890, argv_func=0x0, firstline=1, lastline=1,
> doesrange=0x7ffdd16f8a38, evaluate=1, partial=0x0, selfdict_in=0x0) at
> userfunc.c:1488
> #22 0x000055d62f2d5f1b in get_func_tv (name=0x55d630f771b0
> "Test_edit_forbidden", len=19, rettv=0x7ffdd16f8a70, arg=0x7ffdd16f8a40,
> firstline=1, lastline=1, doesrange=0x7ffdd16f8a38, evaluate=1, partial=0x0,
> selfdict=0x0) at userfunc.c:455
> #23 0x000055d62f2dc3b9 in ex_call (eap=0x7ffdd16f8b60) at userfunc.c:3171
> #24 0x000055d62f1545fb in do_one_cmd (cmdlinep=0x7ffdd16f8da0, sourcing=1,
> cstack=0x7ffdd16f8e90, fgetline=0x55d62f2dc827 <get_func_line>,
> cookie=0x55d630fafa70) at ex_docmd.c:2525
> #25 0x000055d62f151a32 in do_cmdline (cmdline=0x55d630f2caa0 "call
> Test_edit_forbidden()", fgetline=0x55d62f2dc827 <get_func_line>,
> cookie=0x55d630fafa70, flags=3) at ex_docmd.c:1036
> #26 0x000055d62f11aad8 in ex_execute (eap=0x7ffdd16f9450) at eval.c:8183
> #27 0x000055d62f1545fb in do_one_cmd (cmdlinep=0x7ffdd16f9690, sourcing=1,
> cstack=0x7ffdd16f9780, fgetline=0x55d62f2dc827 <get_func_line>,
> cookie=0x55d630fafa70) at ex_docmd.c:2525
> #28 0x000055d62f151a32 in do_cmdline (cmdline=0x0, fgetline=0x55d62f2dc827
> <get_func_line>, cookie=0x55d630fafa70, flags=7) at ex_docmd.c:1036
> #29 0x000055d62f2d7217 in call_user_func (fp=0x55d630f86ca0, argcount=1,
> argvars=0x7ffdd16fa300, rettv=0x7ffdd16fa4e0, firstline=1, lastline=1,
> selfdict=0x0) at userfunc.c:954
> #30 0x000055d62f2d8241 in call_func (funcname=0x55d630f36880 "RunTheTest",
> len=10, rettv=0x7ffdd16fa4e0, argcount_in=1, argvars_in=0x7ffdd16fa300,
> argv_func=0x0, firstline=1, lastline=1,
> doesrange=0x7ffdd16fa4a8, evaluate=1, partial=0x0, selfdict_in=0x0) at
> userfunc.c:1488
> #31 0x000055d62f2d5f1b in get_func_tv (name=0x55d630f36880 "RunTheTest",
> len=10, rettv=0x7ffdd16fa4e0, arg=0x7ffdd16fa4b0, firstline=1, lastline=1,
> doesrange=0x7ffdd16fa4a8, evaluate=1, partial=0x0,
> selfdict=0x0) at userfunc.c:455
> #32 0x000055d62f2dc3b9 in ex_call (eap=0x7ffdd16fa5d0) at userfunc.c:3171
> #33 0x000055d62f1545fb in do_one_cmd (cmdlinep=0x7ffdd16fa810, sourcing=1,
> cstack=0x7ffdd16fa900, fgetline=0x55d62f15262c <get_loop_line>,
> cookie=0x7ffdd16fa8a0) at ex_docmd.c:2525
> #34 0x000055d62f151a32 in do_cmdline (cmdline=0x55d630f70dd0 "\" This script
> is sourced while editing the .vim file with the tests.",
> fgetline=0x55d62f14f9c6 <getsourceline>, cookie=0x7ffdd16fae70, flags=7)
> at ex_docmd.c:1036
> #35 0x000055d62f14f588 in do_source (fname=0x55d630f35da3 "runtest.vim",
> check_other=0, is_vimrc=0) at ex_cmds2.c:4615
> #36 0x000055d62f14eb35 in cmd_source (fname=0x55d630f35da3 "runtest.vim",
> eap=0x7ffdd16fb040) at ex_cmds2.c:4229
> #37 0x000055d62f14ea84 in ex_source (eap=0x7ffdd16fb040) at ex_cmds2.c:4204
> #38 0x000055d62f1545fb in do_one_cmd (cmdlinep=0x7ffdd16fb280, sourcing=1,
> cstack=0x7ffdd16fb370, fgetline=0x0, cookie=0x0) at ex_docmd.c:2525
> #39 0x000055d62f151a32 in do_cmdline (cmdline=0x55d630f38120 "so
> runtest.vim", fgetline=0x0, cookie=0x0, flags=11) at ex_docmd.c:1036
> #40 0x000055d62f151030 in do_cmdline_cmd (cmd=0x55d630f38120 "so
> runtest.vim") at ex_docmd.c:637
> #41 0x000055d62f31a4fc in exe_commands (parmp=0x55d62f3b0b80 <params>) at
> main.c:2964
> #42 0x000055d62f31792f in vim_main2 () at main.c:814
> #43 0x000055d62f3172a7 in main (argc=13, argv=0x7ffdd16fb9d8) at main.c:441
>
> Vim is spinning in edit() around the call to safe_vgetc(). safe_vgetc()
> returns 0x1b (Escape) and cmdchar at the time is 'i'.
>
> The actual loop (at a highlevel, from gdb) is:
>
> 642 if (!revins_legal)
> (gdb)
> 643 revins_scol = -1; /* reset on illegal motions */
> (gdb)
> 647 if (arrow_used) /* don't repeat insert when arrow key
> used */
> (gdb)
> 650 if (update_Insstart_orig)
> (gdb)
> 651 Insstart_orig = Insstart;
> (gdb)
> 653 if (stop_insert_mode
> (gdb)
> 665 if (!arrow_used)
> (gdb)
> 666 curwin->w_set_curswant = TRUE;
> (gdb)
> 670 if (stuff_empty())
> (gdb)
> 672 did_check_timestamps = FALSE;
> (gdb)
> 673 if (need_check_timestamps)
> (gdb)
> 680 msg_scroll = FALSE;
> (gdb)
> 692 if (fdo_flags & FDO_INSERT)
> (gdb)
> 695 if (!char_avail())
> (gdb)
> 700 if (bt_prompt(curbuf))
> (gdb)
> 716 if (curbuf->b_mod_set
> (gdb)
> 725 mincol = curwin->w_wcol;
> (gdb)
> 726 validate_cursor_col();
> (gdb)
> 728 if (
> (gdb)
> 759 update_topline();
> (gdb)
> 763 validate_cursor(); /* may set must_redraw */
> (gdb)
> 769 ins_redraw(TRUE);
> (gdb)
> 771 if (curwin->w_p_scb)
> (gdb)
> 774 if (curwin->w_p_crb)
> (gdb)
> 776 update_curswant();
> (gdb)
> 777 old_topline = curwin->w_topline;
> (gdb)
> 793 if (dont_sync_undo == MAYBE)
> (gdb)
> 797 if (cmdchar == K_PS)
> (gdb)
> 803 c = safe_vgetc();
> (gdb)
> 805 if (stop_insert_mode)
> (gdb)
> 815 did_cursorhold = TRUE;
> (gdb)
> 818 if (p_hkmap && KeyTyped)
> (gdb)
> 822 if (p_fkmap && KeyTyped)
> (gdb)
> 832 if (compl_started
> (gdb)
> 894 compl_get_longest = FALSE;
> (gdb)
> 895 if (ins_compl_prep(c))
> (gdb)
> 902 if (c == Ctrl_BSL)
> (gdb)
> 933 c = do_digraph(c);
> (gdb)
> 937 if ((c == Ctrl_V || c == Ctrl_Q) && ctrl_x_mode ==
> CTRL_X_CMDLINE)
> (gdb)
> 948 if (cindent_on()
> (gdb)
> 968 if (curwin->w_p_rl)
> (gdb)
> 985 if (ins_start_select(c))
> (gdb)
> 991 switch (c)
> (gdb)
> 994 if (echeck_abbr(ESC + ABBR_OFF))
> (gdb)
> 1028 if (goto_im())
> (gdb)
> 1030 if (got_int)
> (gdb)
> 1036 vim_beep(BO_IM);
> (gdb)
> 1607 if (c != K_CURSORHOLD
> (gdb)
> 1613 did_cursorhold = FALSE;
> (gdb)
> 1616 if (arrow_used)
> (gdb)
> 1620 if (can_cindent && cindent_on()
> (gdb)
> 642 if (!revins_legal)
>
> Hope that's enough to figure out how to fix this.
It appears that when this test is executed 'insertmode' is set.
The test itself doesn't do that, so it must be a leftover from another
test that failed. Try commenting out other tests, such as
Test_edit_08() and others that mess with 'insertmode' to find out which
one causes 'insertmode' to be set.
Or add ":set noim" at the end of every test function. Then hopefully
the test finishes and tells you which one failed.
--
A meeting is an event at which the minutes are kept and the hours are lost.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.