Skip to content

Commit cf801d4

Browse files
committed
patch 8.2.5145: exit test causes spurious valgrind reports
Problem: Exit test causes spurious valgrind reports. Solution: Skip test. Add CheckNotValgrind.
1 parent c856ceb commit cf801d4

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

src/testdir/check.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,14 @@ func CheckNotAsan()
217217
endif
218218
endfunc
219219

220+
" Command to check for not running under valgrind
221+
command CheckNotValgrind call CheckNotValgrind()
222+
func CheckNotValgrind()
223+
if RunningWithValgrind()
224+
throw 'Skipped: does not work well with valgrind'
225+
endif
226+
endfunc
227+
220228
" Command to check for X11 based GUI
221229
command CheckX11BasedGui call CheckX11BasedGui()
222230
func CheckX11BasedGui()

src/testdir/test_channel.vim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,9 +1793,7 @@ endfunc
17931793

17941794
func Test_job_stop_immediately()
17951795
" With valgrind this causes spurious leak reports
1796-
if RunningWithValgrind()
1797-
return
1798-
endif
1796+
CheckNotValgrind
17991797

18001798
let g:job = job_start([s:python, '-c', 'import time;time.sleep(10)'])
18011799
try

src/testdir/test_exit.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ func Test_exit_error_reading_input()
115115
CheckNotMSWindows
116116
" The early exit causes memory not to be freed somehow
117117
CheckNotAsan
118+
CheckNotValgrind
118119

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

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ static char *(features[]) =
734734

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
5145,
737739
/**/
738740
5144,
739741
/**/

0 commit comments

Comments
 (0)