patch 9.1.1106: tests: Test_log_nonexistent() causes asan failure
Commit:
https://github.com/vim/vim/commit/88ce0c546b54ecb0dc573b99cde6246f87b42687
Author: Christian Brabandt <[email protected]>
Date: Tue Feb 11 22:58:20 2025 +0100
patch 9.1.1106: tests: Test_log_nonexistent() causes asan failure
Problem: tests: Test_log_nonexistent() causes asan failure
(Hirohito Higashi)
Solution: don't run vim using system(), but run Vim in a terminal
related: #16602
related: #16610
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 78c24e4ab..78bbc7e6b 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -742,10 +742,15 @@ endfunc
func Test_log_nonexistent()
" this used to crash Vim
- CheckFeature channel
+ CheckRunVimInTerminal
CheckUnix
- let result = join(systemlist(GetVimCommand() .. ' --log /X/Xlogfile -c qa!'))
- call assert_match("E484: Can't open file", result)
+ let args = ' -u NONE -i NONE -U NONE --log /X/Xlogfile -X -c qa!'
+ let options = {'term_finish': 'open', 'cmd':
+ \ 'sh -c "' .. GetVimCommand() .. args .. '"'}
+ let buf = RunVimInTerminal('', options)
+ call WaitForAssert({-> assert_match('E484: Can''t open file.*Xlogfile',
term_getline(buf, 1))})
+ " terminal job has already finished, so just close the buffer
+ exe buf .. "bw!"
endfunc
func Test_read_stdin()
diff --git a/src/version.c b/src/version.c
index f9aa19a5b..f17944a7a 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 */
+/**/
+ 1106,
/**/
1105,
/**/
--
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1thyX1-003M9Q-Nl%40256bit.org.