Hi
I have a machine where running vim tests with valgrind
always gives the following error using latest vim-7.4.2196
(but I've seen this with earlier versions too):
===
$ cd src/testdir
$ make
....
Executed 144 tests
1 FAILED:
Found errors in Test_with_partial_callback():
Caught exception in Test_with_partial_callback(): Vim(sleep):E118: Too
many arguments for function: string @ function
RunTheTest[9]..Test_with_partial_callback[8]..WaitFor, line 10
>From test_alot.vim:
Found errors in Test_with_partial_callback():
Caught exception in Test_with_partial_callback(): Vim(sleep):E118: Too
many arguments for function: string @ function
RunTheTest[9]..Test_with_partial_callback[8]..WaitFor, line 10
Test results:
>From test_alot.vim:
Found errors in Test_with_partial_callback():
Caught exception in Test_with_partial_callback(): Vim(sleep):E118: Too
many arguments for function: string @ function
RunTheTest[9]..Test_with_partial_callback[8]..WaitFor, line 10
TEST FAILURE
Makefile:41: recipe for target 'report' failed
make[2]: *** [report] Error 1
make[2]: Leaving directory '/home/dope/sb/vim/src/testdir'
Makefile:1981: recipe for target 'scripttests' failed
make[1]: *** [scripttests] Error 2
make[1]: Leaving directory '/home/dope/sb/vim/src'
Makefile:36: recipe for target 'test' failed
make: *** [test] Error 2
===
Function Test_with_partial_callback() lin src/testdir/test_timers.vim is:
41 func Test_with_partial_callback()
42 let g:val = 0
43 let s:meow = {}
44 function s:meow.bite(...)
45 let g:val += 1
46 endfunction
47
48 call timer_start(50, s:meow.bite)
49 let slept = WaitFor('g:val == 1')
50 call assert_equal(1, g:val)
51 call assert_inrange(30, 100, slept)
52 endfunc
Function WaitFor() in src/testdir/shared.vim is:
111 " Wait for up to a second for "expr" to become true.
112 " Return time slept in milliseconds.
113 func WaitFor(expr)
114 let slept = 0
115 for i in range(100)
116 try
117 if eval(a:expr)
118 return slept
119 endif
120 catch
121 endtry
122 let slept += 10
123 sleep 10m
124 endfor
125 endfunc
Valgrind does not give errors.
All test pass when run without valgrind.
They also pass with the address sanitizer.
Any idea why the test fails when run with valgrind?
Regards
Dominique
--
--
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].
For more options, visit https://groups.google.com/d/optout.