Bram Moolenaar wrote:

> Dominique wrote:
>
>> On Sun, Apr 2, 2017 at 9:28 PM, Dominique Pellé
>> <dominique.pe...@gmail.com> wrote:
>> > Hi
>> >
>> > Running "make test" with vim-8.0.540
>> > on xubuntu-14.04 x86_64 stops during the
>> > test and even closes all my terminal windows!?
>> > It's rather strange and dangerous that all
>> > terminals are closed.
>> >
>> > Same bug also happens on xubuntu-16.04 x86.
>> > It happens all the time.
>> >
>> > Running a single test "cd vim; make test_edit" is
>> > enough to reproduce the problem.
>> >
>> > The last file written in testdir is testdir/message
>> > and the last lines in the file are:
>> >
>> > ...
>> > Executing Test_edit_HOME_END()
>> > Executing Test_edit_INS()
>> > Executing Test_edit_LEFT_RIGHT()
>> > Executing Test_edit_MOUSE()
>> > Executing Test_edit_PAGEUP_PAGEDOWN()
>> > Executing Test_edit_complete_very_long_name()
>> > Executing Test_edit_forbidden()
>> > Executing Test_edit_rightleft()
>> > Executed 41 tests
>> > 1 FAILED:
>> > Found errors in Test_edit_complete_very_long_name():
>> > Caught exception in Test_edit_complete_very_long_name(): Vim:Interrupt
>> > @ function RunTheTest[24]..Test_edit_complete_very_long_name, line 16
>> >
>> >
>> > The terminal is xfce4-terminal.  If I run
>> > tests from a xterm terminal instead, then
>> > the test pass.
>> >
>> > The bug also happens when running the test with valgrind in xfce4-terminal.
>> > Valgrind log shows no error, but testdir/messages  has different 
>> > information
>> > when ran from valgrind:
>> >
>> > Executing Test_edit_complete_very_long_name()
>> > Executing Test_edit_forbidden()
>> > Executing Test_edit_rightleft()
>> > Executed 41 tests
>> > 1 FAILED:
>> > Found errors in Test_edit_complete_very_long_name():
>> > Caught exception in Test_edit_complete_very_long_name():
>> > Vim(call):E739: Cannot create directory:
>> > /home/pel/sb/vim/src/testdir/Xdir/ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
>> > @ function RunTheTest[24]..Test_edit_complete_very_long_name, line 12
>
> Strange that creating the directory depends on the terminal.  Perhaps
> the file system is also different?
>
> We could catch the failure to create the directory and not fail the
> test.  But I would like to know why it fails.
>
>
>> > I'm not sure yet what's going on here. Any idea?
>> >
>> > Vim was configured with:
>> >
>> > $ CC=clang-4.0 ./configure --with-features=huge --enable-gui=none
>> >
>> > Regards
>> > Dominique
>>
>>
>> I found that the test passes if I change it as follows:
>>
>> diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
>> index 4db7bcf..afc3163 100644
>> --- a/src/testdir/test_edit.vim
>> +++ b/src/testdir/test_edit.vim
>> @@ -1329,8 +1329,8 @@ func Test_edit_complete_very_long_name()
>>      return
>>    endif
>>    let save_columns = &columns
>> -  set columns=5000
>> -  call assert_equal(5000, &columns)
>> +  set columns=100
>> +  call assert_equal(100, &columns)
>>    set noswapfile
>>    let dirname = getcwd() . "/Xdir"
>>    let longdirname = dirname . repeat('/' . repeat('d', 255), 4)
>>
>>
>> Why does this test set 'columns' to a very large value?
>> I don't understand it.
>
> The original bug was for not checking that the result of truncating the
> file name, to fit in the command line area, would fit in IObuffer.
> Since IObuffer is about 1024 bytes, the 'columns' value has to be much
> more than that.  I suppose 1200 would also work to reproduce the bug.
>
>> I also found that the following command is
>> enough to close all xfce4-terminal's when run
>> it from a xfce4-terminal:
>>
>> $ vim -u NONE -c 'set columns=5000'
>>
>> It must be a bug in xfce4-terminal.
>
> That indeed sounds like a bug in that terminal.  Perhaps we can do
> something like
>         if $TERM =~ 'xfce4-terminal'
>           throw "Skipped: xfce4 can't cope with this test"
>         endif

My TERM environment variable is set to xterm-256color
even though I use xfce4-terminal. So That would
not work well.


> We could try if xfce4 can handle 'columns' set to 1200, and check that
> the test fails when the fix is not included.

I found that the bug with xfce4-terminal starts to happen
for columns >= 4094.  So using columns=1200 or even more
fixes it, as long as it's not >= 4094.

The bug is apparently fixed in newer versions of xfce4-terminal.
See: https://bugzilla.xfce.org/show_bug.cgi?id=13473
But the versions with xubuntu-14:04 or xubuntu-16.04 are too old
to have the fix. So many users can be affected.

Regards
Dominique

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui