patch 9.2.0438: tests: test_plugin_termdebug is flaky
Commit:
https://github.com/vim/vim/commit/20a124a6e0e2445c500ccc7c496a8fe5d334aed8
Author: Jesse Rosenstock <
j...@google.com>
Date: Mon May 4 19:22:25 2026 +0000
patch 9.2.0438: tests: test_plugin_termdebug is flaky
Problem: Test_termdebug_tbreak(), Test_termdebug_basic(), and
Test_termdebug_toggle_break() use synchronous assert_equal()
to check breakpoint signs immediately after sending commands
to gdb. On slow CI (ASAN, ARM64, macOS) gdb may not have
processed the response yet, causing the sign to be missing.
Solution: Wrap the three assertions in WaitForAssert() to poll until
the signs are placed, matching the pattern already used by
the other assertions in the same tests (Jesse Rosenstock).
closes: #20133
Co-authored-by: Gemini
Signed-off-by: Jesse Rosenstock <
j...@google.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/testdir/test_plugin_termdebug.vim b/src/testdir/test_plugin_termdebug.vim
index f65180648..4e8925222 100644
--- a/src/testdir/test_plugin_termdebug.vim
+++ b/src/testdir/test_plugin_termdebug.vim
@@ -162,10 +162,10 @@ func Test_termdebug_basic()
Break 9
call term_wait(gdb_buf)
redraw!
- call assert_equal([
+ call WaitForAssert({-> assert_equal([
\ {'lnum': 9, 'id': 1014, 'name': 'debugBreakpoint1.0',
\ 'priority': 110, 'group': 'TermDebug'}],
- \ sign_getplaced('', #{group: 'TermDebug'})[0].signs)
+ \ sign_getplaced('', #{group: 'TermDebug'})[0].signs)})
Run
call term_wait(gdb_buf, 400)
redraw!
@@ -324,12 +324,12 @@ func Test_termdebug_tbreak()
call term_wait(gdb_buf)
redraw!
" both temporary and normal breakpoint signs were displayed...
- call assert_equal([
+ call WaitForAssert({-> assert_equal([
\ {'lnum': temp_bp_line, 'id': 1014, 'name': 'debugBreakpoint1.0',
\ 'priority': 110, 'group': 'TermDebug'},
\ {'lnum': bp_line, 'id': 2014, 'name': 'debugBreakpoint2.0',
\ 'priority': 110, 'group': 'TermDebug'}],
- \ sign_getplaced('', #{group: 'TermDebug'})[0].signs)
+ \ sign_getplaced('', #{group: 'TermDebug'})[0].signs)})
Run
call term_wait(gdb_buf, 400)
@@ -717,10 +717,10 @@ func Test_termdebug_toggle_break()
call term_wait(gdb_buf)
redraw!
- call assert_equal([
+ call WaitForAssert({-> assert_equal([
\ {'lnum': bp_line, 'id': 1014, 'name': 'debugBreakpoint1.0',
\ 'priority': 110, 'group': 'TermDebug'}],
- \ sign_getplaced('', #{group: 'TermDebug'})[0].signs)
+ \ sign_getplaced('', #{group: 'TermDebug'})[0].signs)})
RunOrContinue
call term_wait(gdb_buf, 400)
diff --git a/src/version.c b/src/version.c
index 597842bf9..59084a362 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 438,
/**/
437,
/**/