patch 9.1.0827: CI: tests can be improved

Commit: 
https://github.com/vim/vim/commit/f1d83c4c71dce0edefc9a94b2dfa3ca1c343f837
Author: Aliaksei Budavei <0x000...@gmail.com>
Date:   Sat Nov 2 15:51:14 2024 +0100

    patch 9.1.0827: CI: tests can be improved
    
    Problem:  CI: tests can be improved
    Solution: collect failed indent tests, raise timeout for search()
              functions when using ASAN/Valgrind (Aliaksei Budavei)
    
    ASan-instrumented Vim builds tend to run slower (x2) than
    non-instrumented Vim builds and occasionally make indent
    tests fail when "search*()" functions time out and give up
    further execution.
    
    Reference:
    https://github.com/google/sanitizers/wiki/AddressSanitizer
    
    closes: #15974
    
    Co-authored-by: Christian Brabandt <c...@256bit.org>
    Signed-off-by: Aliaksei Budavei <0x000...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/.cirrus.yml b/.cirrus.yml
index ec897b809..e81ed84d7 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -22,9 +22,10 @@ freebsd_task:
     - chown -R cirrus:cirrus .
     - sudo -u cirrus make test
   on_failure:
-    screendump_artifacts:
+    test_artifacts:
       name: "Cirrus-CI-freebsd-failed-tests"
       path: |
+        runtime/indent/testdir/*.fail
         runtime/syntax/testdir/failed/*
         src/testdir/failed/*
       type: application/octet-stream
diff --git a/.github/actions/screendump/action.yml 
b/.github/actions/test_artifacts/action.yml
similarity index 86%
rename from .github/actions/screendump/action.yml
rename to .github/actions/test_artifacts/action.yml
index 5cbc8200c..44738c505 100644
--- a/.github/actions/screendump/action.yml
+++ b/.github/actions/test_artifacts/action.yml
@@ -1,5 +1,5 @@
-name: 'screendump'
-description: "Upload failed screendump tests"
+name: 'test_artifacts'
+description: "Upload failed test artifacts"
 runs:
   using: "composite"
   steps:
@@ -12,6 +12,7 @@ runs:
         # A file, directory or wildcard pattern that describes what
         # to upload.
         path: |
+         ${{ github.workspace }}/runtime/indent/testdir/*.fail
          ${{ github.workspace }}/runtime/syntax/testdir/failed/*
          ${{ github.workspace }}/src/testdir/failed/*
         # The desired behavior if no files are found using the
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index df1041851..19edd13ea 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -272,7 +272,7 @@ jobs:
           do_test make ${SHADOWOPT} ${TEST}
 
       - if: ${{ !cancelled() }}
-        uses: ./.github/actions/screendump
+        uses: ./.github/actions/test_artifacts
 
       - name: Vim tags
         if: contains(matrix.extra, 'vimtags')
@@ -394,7 +394,7 @@ jobs:
           make ${TEST}
 
       - if: ${{ !cancelled() }}
-        uses: ./.github/actions/screendump
+        uses: ./.github/actions/test_artifacts
 
   windows:
     runs-on: windows-2022
@@ -704,7 +704,7 @@ jobs:
           )
 
       - if: ${{ !cancelled() }}
-        uses: ./.github/actions/screendump
+        uses: ./.github/actions/test_artifacts
 
       - name: Generate gcov files
         if: matrix.coverage
diff --git a/Filelist b/Filelist
index 803de2ae0..9b0617381 100644
--- a/Filelist
+++ b/Filelist
@@ -10,8 +10,8 @@ SRC_ALL =     \
                .github/ISSUE_TEMPLATE/feature_request.md \
                .github/workflows/ci.yml \
                .github/workflows/codeql-analysis.yml \
-               .github/actions/screendump/action.yml \
                .github/workflows/coverity.yml \
+               .github/actions/test_artifacts/action.yml \
                .github/dependabot.yml \
                .gitignore \
                .hgignore \
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index ded31975b..9bb500e26 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -247,6 +247,11 @@ func RunTheTest(test)
     let g:timeout_start = localtime()
   endif
 
+  if ValgrindOrAsan()
+    let g:vim_indent = {"searchpair_timeout": 1024}
+    let g:python_indent = {"searchpair_timeout": 1024}
+  endif
+
   " Avoid stopping at the "hit enter" prompt
   set nomore
 
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index 1edf65ac8..a9b422c30 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -318,6 +318,14 @@ func RunningWithValgrind()
   return GetVimCommand() =~ '\<valgrind\>'
 endfunc
 
+func RunningAsan()
+  return exists("$ASAN_OPTIONS")
+endfunc
+
+func ValgrindOrAsan()
+  return RunningWithValgrind() || RunningAsan()
+endfun
+
 " Get the command to run Vim, with --clean instead of "-u NONE".
 func GetVimCommandClean()
   let cmd = GetVimCommand()
diff --git a/src/version.c b/src/version.c
index 493de72f6..4aa4ab7ed 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    827,
 /**/
     826,
 /**/

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1t7Fbn-008azK-Di%40256bit.org.

Raspunde prin e-mail lui