Patch 8.2.5158
Problem:    TSTP and INT signal tests are not run with valgrind.
Solution:   Sleep a bit longer. (closes #10614)
Files:      src/testdir/test_signals.vim


*** ../vim-8.2.5157/src/testdir/test_signals.vim        2022-03-22 
21:14:51.752456009 +0000
--- src/testdir/test_signals.vim        2022-06-25 12:10:03.350293213 +0100
***************
*** 85,104 ****
      throw 'Skipped: INT signal not supported'
    endif
  
-   " Skip the test when running with valgrind as signal INT is not received
-   " somehow by Vim when running with valgrind.
-   let cmd = GetVimCommand()
-   if cmd =~ 'valgrind'
-     throw 'Skipped: cannot test signal INT with valgrind'
-   endif
- 
    let buf = RunVimInTerminal('', {'rows': 6})
    let pid_vim = term_getjob(buf)->job_info().process
  
    " Check that an endless loop in Vim is interrupted by signal INT.
    call term_sendkeys(buf, ":while 1 | endwhile\n")
    call WaitForAssert({-> assert_equal(':while 1 | endwhile', 
term_getline(buf, 6))})
    exe 'silent !kill -s INT ' .. pid_vim
    call term_sendkeys(buf, ":call setline(1, 'INTERRUPTED')\n")
    call WaitForAssert({-> assert_equal('INTERRUPTED', term_getline(buf, 1))})
  
--- 85,99 ----
      throw 'Skipped: INT signal not supported'
    endif
  
    let buf = RunVimInTerminal('', {'rows': 6})
    let pid_vim = term_getjob(buf)->job_info().process
  
    " Check that an endless loop in Vim is interrupted by signal INT.
+   call term_sendkeys(buf, ":call setline(1, 'running')\n")
    call term_sendkeys(buf, ":while 1 | endwhile\n")
    call WaitForAssert({-> assert_equal(':while 1 | endwhile', 
term_getline(buf, 6))})
    exe 'silent !kill -s INT ' .. pid_vim
+   sleep 50m
    call term_sendkeys(buf, ":call setline(1, 'INTERRUPTED')\n")
    call WaitForAssert({-> assert_equal('INTERRUPTED', term_getline(buf, 1))})
  
***************
*** 112,124 ****
      throw 'Skipped: TSTP signal not supported'
    endif
  
-   " Skip the test when running with valgrind as signal TSTP is not received
-   " somehow by Vim when running with valgrind.
-   let cmd = GetVimCommand()
-   if cmd =~ 'valgrind'
-     throw 'Skipped: cannot test signal TSTP with valgrind'
-   endif
- 
    " If test fails once, it can leave temporary files and trying to rerun
    " the test would then fail again if they are not deleted first.
    call delete('.Xsig_TERM.swp')
--- 107,112 ----
***************
*** 142,150 ****
    exe 'silent !kill -s TSTP ' .. pid_vim
    call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
  
!   " We resume after the suspend
    exe 'silent !kill -s CONT ' .. pid_vim
!   exe 'silent !sleep 0.006'
  
    call StopVimInTerminal(buf)
  
--- 130,139 ----
    exe 'silent !kill -s TSTP ' .. pid_vim
    call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
  
!   " We resume after the suspend.  Sleep a bit for the signal to take effect,
!   " also when running under valgrind. 
    exe 'silent !kill -s CONT ' .. pid_vim
!   sleep 100m
  
    call StopVimInTerminal(buf)
  
*** ../vim-8.2.5157/src/version.c       2022-06-24 20:18:05.906326389 +0100
--- src/version.c       2022-06-25 11:56:08.368477537 +0100
***************
*** 737,738 ****
--- 737,740 ----
  {   /* Add new patch number below this line */
+ /**/
+     5158,
  /**/

-- 
The process for understanding customers primarily involves sitting around with
other marketing people and talking about what you would to if you were dumb
enough to be a customer.
                                (Scott Adams - The Dilbert principle)

 /// 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/20220625111440.CD60A1C0842%40moolenaar.net.

Raspunde prin e-mail lui