patch 8.2.5143: some tests fail when using valgrind

Problem:    Some tests fail when using valgrind. Spurious leak reports.
Solution:   Use WaitForAssert().  Avoid failing fork/exec.  Skip tests where a
            job is killed when running valgrind.
diff --git a/src/testdir/test_cscope.vim b/src/testdir/test_cscope.vim
index ba19419..bfc9de8 100644
--- a/src/testdir/test_cscope.vim
+++ b/src/testdir/test_cscope.vim
@@ -244,10 +244,13 @@
     call assert_equal('', a)
 
     " Test: 'csprg' option
-    call assert_equal('cscope', &csprg)
-    set csprg=doesnotexist
-    call assert_fails('cscope add Xcscope2.out', 'E262:')
-    set csprg=cscope
+    " Skip this with valgrind, it causes spurious leak reports
+    if !RunningWithValgrind()
+      call assert_equal('cscope', &csprg)
+      set csprg=doesnotexist
+      call assert_fails('cscope add Xcscope2.out', 'E262:')
+      set csprg=cscope
+    endif
 
     " Test: multiple cscope connections
     cscope add Xcscope.out