]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.5145: exit test causes spurious valgrind reports v8.2.5145
authorBram Moolenaar <Bram@vim.org>
Tue, 21 Jun 2022 17:34:42 +0000 (18:34 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 21 Jun 2022 17:34:42 +0000 (18:34 +0100)
Problem:    Exit test causes spurious valgrind reports.
Solution:   Skip test.  Add CheckNotValgrind.

src/testdir/check.vim
src/testdir/test_channel.vim
src/testdir/test_exit.vim
src/version.c

index aff0918454a74542018e0f6319af83693cca52e3..d64e8457b10ad160e0bf5e2e1a1472fbb577b6ca 100644 (file)
@@ -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()
index a7a609bd0e3fe49afcbd800feb38cfdb23fcb453..d299ee3e62991cc81cf7554a1990cb56bcb035c2 100644 (file)
@@ -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
index c05374cb86654d8337629bef98777d14b285dcc4..a7596e10190430487ba3c5e7ae2ad9f2cc595f83 100644 (file)
@@ -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')
 
index 9b2fd4e7a34c1b1b996c6b94375f4d9fd1b9b813..0353e90cff447b8367b9ae6f8cb69879af985d4d 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5145,
 /**/
     5144,
 /**/