Patch 8.2.3518
Problem:    Test_xrestore sometimes fails.
Solution:   Mark the test as flayky.  Move marking test as flaky to the test
            instead of listing them in runtest.
Files:      src/testdir/test_paste.vim, src/testdir/runtest.vim,
            src/testdir/test_autocmd.vim, src/testdir/test_channel.vim,
            src/testdir/test_clientserver.vim, src/testdir/test_diffmode.vim,
            src/testdir/test_functions.vim, src/testdir/test_gui.vim,
            src/testdir/test_mapping.vim, src/testdir/test_popup.vim,
            src/testdir/test_quotestar.vim, src/testdir/test_reltime.vim,
            src/testdir/test_terminal.vim, src/testdir/test_terminal2.vim,
            src/testdir/test_timers.vim


*** ../vim-8.2.3517/src/testdir/test_paste.vim  2021-06-13 20:52:42.525260056 
+0100
--- src/testdir/test_paste.vim  2021-10-16 12:42:01.317319785 +0100
***************
*** 136,141 ****
--- 136,143 ----
  
  func Test_xrestore()
    CheckFeature xterm_clipboard
+   let g:test_is_flaky = 1
+ 
    let display = $DISPLAY
    new
    call CheckCopyPaste()
*** ../vim-8.2.3517/src/testdir/runtest.vim     2021-08-07 16:20:07.966856597 
+0100
--- src/testdir/runtest.vim     2021-10-16 12:57:09.353228210 +0100
***************
*** 404,445 ****
    endtry
  endif
  
- " Names of flaky tests.
- let s:flaky_tests = [
-       \ 'Test_BufWrite_lockmarks()',
-       \ 'Test_autocmd_SafeState()',
-       \ 'Test_bufunload_all()',
-       \ 'Test_client_server()',
-       \ 'Test_close_and_exit_cb()',
-       \ 'Test_close_output_buffer()',
-       \ 'Test_collapse_buffers()',
-       \ 'Test_cwd()',
-       \ 'Test_diff_screen()',
-       \ 'Test_exit_callback_interval()',
-       \ 'Test_map_timeout_with_timer_interrupt()',
-       \ 'Test_out_cb()',
-       \ 'Test_pipe_through_sort_all()',
-       \ 'Test_pipe_through_sort_some()',
-       \ 'Test_popup_and_window_resize()',
-       \ 'Test_quoteplus()',
-       \ 'Test_quotestar()',
-       \ 'Test_reltime()',
-       \ 'Test_state()',
-       \ 'Test_terminal_composing_unicode()',
-       \ 'Test_terminal_does_not_truncate_last_newlines()',
-       \ 'Test_terminal_no_cmd()',
-       \ 'Test_terminal_noblock()',
-       \ 'Test_terminal_redir_file()',
-       \ 'Test_termwinscroll()',
-       \ 'Test_timer_oneshot()',
-       \ 'Test_timer_paused()',
-       \ 'Test_timer_repeat_many()',
-       \ 'Test_timer_repeat_three()',
-       \ 'Test_timer_stop_all_in_callback()',
-       \ 'Test_timer_stop_in_callback()',
-       \ 'Test_timer_with_partial_callback()',
-       \ ]
- 
  " Locate Test_ functions and execute them.
  redir @q
  silent function /^Test_
--- 404,409 ----
***************
*** 491,498 ****
    " - it fails five times (with a different message)
    if len(v:errors) > 0
          \ && $TEST_NO_RETRY == ''
!         \ && (index(s:flaky_tests, g:testfunc) >= 0
!         \      || g:test_is_flaky)
      while 1
        call add(s:messages, 'Found errors in ' . g:testfunc . ':')
        call extend(s:messages, v:errors)
--- 455,461 ----
    " - it fails five times (with a different message)
    if len(v:errors) > 0
          \ && $TEST_NO_RETRY == ''
!         \ && g:test_is_flaky
      while 1
        call add(s:messages, 'Found errors in ' . g:testfunc . ':')
        call extend(s:messages, v:errors)
*** ../vim-8.2.3517/src/testdir/test_autocmd.vim        2021-10-16 
11:58:51.409123004 +0100
--- src/testdir/test_autocmd.vim        2021-10-16 12:45:13.708602095 +0100
***************
*** 1490,1495 ****
--- 1490,1496 ----
  
  " Test for BufUnload autocommand that unloads all the other buffers
  func Test_bufunload_all()
+   let g:test_is_flaky = 1
    call writefile(['Test file Xxx1'], 'Xxx1')"
    call writefile(['Test file Xxx2'], 'Xxx2')"
  
***************
*** 2378,2383 ****
--- 2379,2385 ----
  
  func Test_autocmd_SafeState()
    CheckRunVimInTerminal
+   let g:test_is_flaky = 1
  
    let lines =<< trim END
        let g:safe = 0
***************
*** 2458,2463 ****
--- 2460,2466 ----
  endfunc
  
  func Test_BufWrite_lockmarks()
+   let g:test_is_flaky = 1
    edit! Xtest
    call setline(1, ['a', 'b', 'c', 'd'])
  
*** ../vim-8.2.3517/src/testdir/test_channel.vim        2021-10-05 
19:19:31.963894252 +0100
--- src/testdir/test_channel.vim        2021-10-16 12:49:59.441932372 +0100
***************
*** 795,800 ****
--- 795,801 ----
  endfunc
  
  func Test_close_output_buffer()
+   let g:test_is_flaky = 1
    enew!
    let test_lines = ['one', 'two']
    call setline(1, test_lines)
***************
*** 935,940 ****
--- 936,942 ----
  
  func Run_pipe_through_sort(all, use_buffer)
    CheckExecutable sort
+   let g:test_is_flaky = 1
  
    let options = {'out_io': 'buffer', 'out_name': 'sortout'}
    if a:use_buffer
***************
*** 1206,1211 ****
--- 1208,1214 ----
  endfunc
  
  func Test_out_cb()
+   let g:test_is_flaky = 1
    let dict = {'thisis': 'dict: '}
    func dict.outHandler(chan, msg) dict
      if type(a:msg) == v:t_string
***************
*** 1333,1338 ****
--- 1336,1342 ----
  endfunc
  
  func Test_close_and_exit_cb()
+   let g:test_is_flaky = 1
    let g:retdict = {'ret': {}}
    func g:retdict.close_cb(ch) dict
      let self.ret['close_cb'] = a:ch->ch_getjob()->job_status()
***************
*** 1560,1565 ****
--- 1564,1570 ----
  
  func Test_exit_callback_interval()
    CheckFunction reltimefloat
+   let g:test_is_flaky = 1
  
    let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0}
    let job = [s:python, '-c', 'import 
time;time.sleep(0.5)']->job_start({'exit_cb': 'MyExitTimeCb'})
***************
*** 1742,1747 ****
--- 1747,1753 ----
  endfunc
  
  func Test_collapse_buffers()
+   let g:test_is_flaky = 1
    CheckExecutable cat
  
    sp test_channel.vim
***************
*** 1884,1889 ****
--- 1890,1896 ----
  endfunc
  
  func Test_cwd()
+   let g:test_is_flaky = 1
    let g:envstr = ''
    if has('win32')
      let expect = $TEMP
*** ../vim-8.2.3517/src/testdir/test_clientserver.vim   2021-07-05 
13:10:00.431729296 +0100
--- src/testdir/test_clientserver.vim   2021-10-16 12:46:07.149642529 +0100
***************
*** 26,31 ****
--- 26,32 ----
  endfunc
  
  func Test_client_server()
+   let g:test_is_flaky = 1
    let cmd = GetVimCommand()
    if cmd == ''
      throw 'GetVimCommand() failed'
*** ../vim-8.2.3517/src/testdir/test_diffmode.vim       2021-09-01 
15:01:29.601137676 +0100
--- src/testdir/test_diffmode.vim       2021-10-16 12:48:58.100831236 +0100
***************
*** 845,850 ****
--- 845,851 ----
  endfunc
  
  func Test_diff_screen()
+   let g:test_is_flaky = 1
    CheckScreendump
    CheckFeature menu
  
*** ../vim-8.2.3517/src/testdir/test_functions.vim      2021-10-03 
15:19:09.821731156 +0100
--- src/testdir/test_functions.vim      2021-10-16 12:53:08.241213038 +0100
***************
*** 2286,2291 ****
--- 2286,2292 ----
  
  func Test_state()
    CheckRunVimInTerminal
+   let g:test_is_flaky = 1
  
    let getstate = ":echo 'state: ' .. g:state .. '; mode: ' .. g:mode\<CR>"
  
*** ../vim-8.2.3517/src/testdir/test_gui.vim    2021-07-24 20:33:22.391681954 
+0100
--- src/testdir/test_gui.vim    2021-10-16 12:51:53.215926810 +0100
***************
*** 120,125 ****
--- 120,126 ----
  endfunc
  
  func Test_quoteplus()
+   let g:test_is_flaky = 1
    let skipped = ''
  
    if !g:x11_based_gui
*** ../vim-8.2.3517/src/testdir/test_mapping.vim        2021-06-13 
20:52:42.521260063 +0100
--- src/testdir/test_mapping.vim        2021-10-16 12:49:23.317286310 +0100
***************
*** 289,294 ****
--- 289,295 ----
  func Test_map_timeout_with_timer_interrupt()
    CheckFeature job
    CheckFeature timers
+   let g:test_is_flaky = 1
  
    " Confirm the timer invoked in exit_cb of the job doesn't disturb mapped key
    " sequence.
***************
*** 1155,1161 ****
    call feedkeys("v\<F4>", 'xt!')
    call assert_equal(['v', 1, 12], [mode(1), col('v'), col('.')])
  
!   " can invoke an opeartor, ending the visual mode
    let @a = ''
    call feedkeys("\<F5>", 'xt!')
    call assert_equal('n', mode(1))
--- 1156,1162 ----
    call feedkeys("v\<F4>", 'xt!')
    call assert_equal(['v', 1, 12], [mode(1), col('v'), col('.')])
  
!   " can invoke an operator, ending the visual mode
    let @a = ''
    call feedkeys("\<F5>", 'xt!')
    call assert_equal('n', mode(1))
*** ../vim-8.2.3517/src/testdir/test_popup.vim  2021-10-03 12:01:23.533541368 
+0100
--- src/testdir/test_popup.vim  2021-10-16 12:51:30.887539832 +0100
***************
*** 665,670 ****
--- 665,671 ----
    CheckFeature terminal
    CheckFeature quickfix
    CheckNotGui
+   let g:test_is_flaky = 1
  
    let h = winheight(0)
    if h < 15
*** ../vim-8.2.3517/src/testdir/test_quotestar.vim      2020-11-22 
13:23:57.059233488 +0000
--- src/testdir/test_quotestar.vim      2021-10-16 12:52:11.252237948 +0100
***************
*** 131,136 ****
--- 131,137 ----
  endfunc
  
  func Test_quotestar()
+   let g:test_is_flaky = 1
    let skipped = ''
  
    let quotestar_saved = @*
*** ../vim-8.2.3517/src/testdir/test_reltime.vim        2021-07-15 
11:48:08.811766844 +0100
--- src/testdir/test_reltime.vim        2021-10-16 12:52:58.821052660 +0100
***************
*** 5,10 ****
--- 5,11 ----
  CheckFeature float
  
  func Test_reltime()
+   let g:test_is_flaky = 1
    let now = reltime()
    sleep 10m
    let later = reltime()
*** ../vim-8.2.3517/src/testdir/test_terminal.vim       2021-04-29 
19:18:41.970795473 +0100
--- src/testdir/test_terminal.vim       2021-10-16 12:54:31.498617844 +0100
***************
*** 698,703 ****
--- 698,704 ----
  endfunction
  
  func Test_terminal_noblock()
+   let g:test_is_flaky = 1
    let buf = term_start(&shell)
    let wait_time = 5000
    let letters = 'abcdefghijklmnopqrstuvwxyz'
***************
*** 805,810 ****
--- 806,812 ----
  endfunc
  
  func Test_terminal_no_cmd()
+   let g:test_is_flaky = 1
    let buf = term_start('NONE', {})
    call assert_notequal(0, buf)
  
***************
*** 855,860 ****
--- 857,863 ----
  endfunc
  
  func Test_terminal_redir_file()
+   let g:test_is_flaky = 1
    let cmd = Get_cat_123_cmd()
    let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'})
    call TermWait(buf)
***************
*** 946,951 ****
--- 949,955 ----
  endfunc
  
  func Test_terminal_composing_unicode()
+   let g:test_is_flaky = 1
    let save_enc = &encoding
    set encoding=utf-8
  
*** ../vim-8.2.3517/src/testdir/test_terminal2.vim      2021-03-23 
18:22:08.942052565 +0000
--- src/testdir/test_terminal2.vim      2021-10-16 12:54:43.938825929 +0100
***************
*** 217,222 ****
--- 217,223 ----
    CheckUnix
    " TODO: Somehow this test sometimes hangs in the GUI
    CheckNotGui
+   let g:test_is_flaky = 1
  
    " Let the terminal output more than 'termwinscroll' lines, some at the start
    " will be dropped.
***************
*** 412,417 ****
--- 413,419 ----
    if has('conpty')
      throw 'Skipped: fail on ConPTY'
    endif
+   let g:test_is_flaky = 1
    let contents = [
    \   [ 'One', '', 'X' ],
    \   [ 'Two', '', '' ],
*** ../vim-8.2.3517/src/testdir/test_timers.vim 2021-04-22 20:39:26.239762214 
+0100
--- src/testdir/test_timers.vim 2021-10-16 12:56:34.480656763 +0100
***************
*** 16,21 ****
--- 16,22 ----
  endfunc
  
  func Test_timer_oneshot()
+   let g:test_is_flaky = 1
    let g:val = 0
    let timer = timer_start(50, 'MyHandler')
    let slept = WaitFor('g:val == 1')
***************
*** 34,39 ****
--- 35,41 ----
  endfunc
  
  func Test_timer_repeat_three()
+   let g:test_is_flaky = 1
    let g:val = 0
    let timer = timer_start(50, 'MyHandler', {'repeat': 3})
    let slept = WaitFor('g:val == 3')
***************
*** 51,56 ****
--- 53,59 ----
  endfunc
  
  func Test_timer_repeat_many()
+   let g:test_is_flaky = 1
    let g:val = 0
    let timer = timer_start(50, 'MyHandler', {'repeat': -1})
    sleep 200m
***************
*** 64,69 ****
--- 67,73 ----
  endfunc
  
  func Test_timer_with_partial_callback()
+   let g:test_is_flaky = 1
    let g:val = 0
    let meow = {'one': 1}
    function meow.bite(...)
***************
*** 127,132 ****
--- 131,137 ----
  endfunc
  
  func Test_timer_paused()
+   let g:test_is_flaky = 1
    let g:val = 0
  
    let id = timer_start(50, 'MyHandler')
***************
*** 186,191 ****
--- 191,197 ----
  endfunc
  
  func Test_timer_stop_in_callback()
+   let g:test_is_flaky = 1
    call assert_equal(0, len(timer_info()))
    let g:timer1 = timer_start(10, 'StopTimer1')
    let slept = 0
***************
*** 205,210 ****
--- 211,217 ----
  endfunc
  
  func Test_timer_stop_all_in_callback()
+   let g:test_is_flaky = 1
    call assert_equal(0, len(timer_info()))
    call timer_start(10, 'StopTimerAll')
    call assert_equal(1, len(timer_info()))
***************
*** 471,474 ****
--- 478,482 ----
    call delete('XTest_timermessage')
  endfunc
  
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.3517/src/version.c       2021-10-16 11:58:51.409123004 +0100
--- src/version.c       2021-10-16 12:57:57.006004907 +0100
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3518,
  /**/

-- 
"Hit any key to continue" is very confusing when you have two keyboards.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211016120110.D6BF5C80053%40moolenaar.net.

Raspunde prin e-mail lui