Skip to content

Commit

Permalink
patch 8.2.5145: exit test causes spurious valgrind reports
Browse files Browse the repository at this point in the history
Problem:    Exit test causes spurious valgrind reports.
Solution:   Skip test.  Add CheckNotValgrind.
  • Loading branch information
brammool committed Jun 21, 2022
1 parent c856ceb commit cf801d4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/testdir/check.vim
Expand Up @@ -217,6 +217,14 @@ func CheckNotAsan()
endif
endfunc

" Command to check for not running under valgrind
command CheckNotValgrind call CheckNotValgrind()
func CheckNotValgrind()
if RunningWithValgrind()
throw 'Skipped: does not work well with valgrind'
endif
endfunc

" Command to check for X11 based GUI
command CheckX11BasedGui call CheckX11BasedGui()
func CheckX11BasedGui()
Expand Down
4 changes: 1 addition & 3 deletions src/testdir/test_channel.vim
Expand Up @@ -1793,9 +1793,7 @@ endfunc

func Test_job_stop_immediately()
" With valgrind this causes spurious leak reports
if RunningWithValgrind()
return
endif
CheckNotValgrind

let g:job = job_start([s:python, '-c', 'import time;time.sleep(10)'])
try
Expand Down
1 change: 1 addition & 0 deletions src/testdir/test_exit.vim
Expand Up @@ -115,6 +115,7 @@ func Test_exit_error_reading_input()
CheckNotMSWindows
" The early exit causes memory not to be freed somehow
CheckNotAsan
CheckNotValgrind

call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew", "q:"], 'Xscript', 'b')

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5145,
/**/
5144,
/**/
Expand Down

0 comments on commit cf801d4

Please sign in to comment.