Patch to fix a memory leak when vimgrep fails
Hi, Running the quickfix tests under valgrind reports a memory leak when vimgrep fails. The attached patch fixes this leak. - Yegappan -- -- 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. For more options, visit https://groups.google.com/d/optout. memleak.diff Description: Binary data
Re: vim prompt E484: Can't open file
在 2018年4月6日星期五 UTC+8下午10:38:03,Christian Brabandt写道: > On Do, 05 Apr 2018, brucekan...@gmail.com wrote: > > > 在 2018年4月3日星期二 UTC+8下午6:35:57,Christian Brabandt写道: > > > On Di, 03 Apr 2018, brucekan...@gmail.com wrote: > > > > > > > I'm using VIM 8.0 and set the option: "set > > > > cscopequickfix=s-,c-,d-,i-,t-,e-" > > > > vim will prompt "E484: Can't open file /tmp/vx/n" occasionally if > > > > I'm not root user. > > > > > > > > when set above option, vim will generate a temp directory under /tmp, I > > > > found the temp direcoty was deleted every time when the fault was > > > > occurred. > > > > > > > > after checking source code, the suspecious place is in function: > > > > vim_tempname > > > > > > > > if (vim_tempdir != NULL) > > > > { > > > > /* There is no need to check if the file exists, because we own the > > > > * directory and nobody else creates a file in it. */ > > > > sprintf((char *)itmp, "%s%ld", vim_tempdir, temp_count++); > > > > return vim_strsave(itmp); > > > > } > > > > > > > > if the vim_tempdir is deleted by unknown operation/process, then vim > > > > will fault due to it not checking this temp directory before writing > > > > it, maybe we need to check vim_tempdir here, if it's not accessable, we > > > > build another temp directory. > > > > > > Do you have any tmp cleanup packages installed that may remove such > > > things? Try to disable it. > > > > > > I have proposed a similar patch several years ago, but it was found to > > > work around the real problem that /tmp should not be cleaned randomly, > > > so it wasn't included. > > > > > > > > > Best, > > > Christian > > > -- > > > Wußten Sie schon... > > > ... daß der Walfisch, das größte lebende Säugetier, alle anderen > > > Säugetiere an Größe übertrifft? > > > > Hi Christian, > > Thanks for you response, I haven't deep investigated which > > process/operation delete that temp directory(this fault only appear when I > > am a normal user, when I am root, everything is ok), there is another > > scenario: vim user may use vim on a shared server, they can't disable > > cleanup process run in background or prevent other user delete that temp > > diretory, so they can't guarantee that temp direcoty is always there, my > > opinion is vim should not depend it's stability on external environment > > especially public directory, there may happen something out of vim user's > > control. > > True, but some people believe that the system is broken, if it silently > deletes directories below /tmp. After all, that's what /tmp is for. It > may only be deleted on reboot. > > Best, > Christian > > -- > Was wir der Natur antun, tun wir uns selbst an. > -- Sprichwort der Mapuche-Indianer (Chile) Hi Christian, I traced the temp directory by "auditd", I found it's deleted by "gnome-settings-daemon" due to I have set cleanup temp files automatically for protect privacy in gnome-shell. now it's clear, gnome-shell cleanup the temp directory for protect privacy, the temp directory lost cause vim fault, it also can explain why everything is ok when I'm root in terminal(gnome-shell belong to normal user can't delete the temp directory which belong to root) from technology perspective, it's no problem, /tmp is for temp files from product or high level perspective: I'm a linux user, I use vim, and I also need my system protect my privacy, after all, I use other applications too, for current solution, I have to disable cleanup program which protect my privacy if I want vim run well. so, should vim improve itself ? Thank you. BR, Bruce. -- -- 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. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1699
Patch 8.0.1699 Problem:Leftover stuff for Python 1.4. Solution: Remove outdated Python 1.4 stuff. (Naoki Inada, closes #2794) Files: src/Makefile, src/config.aap.in, src/config.mk.in, src/configure.ac, src/auto/configure *** ../vim-8.0.1698/src/Makefile2018-04-10 19:23:59.281563695 +0200 --- src/Makefile2018-04-11 22:14:38.354100550 +0200 *** *** 3170,3181 objects/if_perlsfio.o: if_perlsfio.c $(CCC_NF) $(PERL_CFLAGS) $(ALL_CFLAGS) -o $@ if_perlsfio.c - objects/py_getpath.o: $(PYTHON_CONFDIR)/getpath.c - $(CCC_NF) $(PYTHON_CFLAGS) $(ALL_CFLAGS) -o $@ \ - $(PYTHON_CONFDIR)/getpath.c \ - -I$(PYTHON_CONFDIR) -DHAVE_CONFIG_H -DNO_MAIN \ - $(PYTHON_GETPATH_CFLAGS) - objects/if_python.o: if_python.c if_py_both.h $(CCC_NF) $(PYTHON_CFLAGS) $(PYTHON_CFLAGS_EXTRA) $(ALL_CFLAGS) -o $@ if_python.c --- 3172,3177 *** ../vim-8.0.1698/src/config.aap.in 2016-02-27 18:03:48.0 +0100 --- src/config.aap.in 2018-04-11 22:14:38.354100550 +0200 *** *** 47,54 PYTHON_OBJ= @PYTHON_OBJ@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ - PYTHON_CONFDIR= @PYTHON_CONFDIR@ - PYTHON_GETPATH_CFLAGS = @PYTHON_GETPATH_CFLAGS@ TCL = @vi_cv_path_tcl@ TCL_SRC = @TCL_SRC@ --- 47,52 *** ../vim-8.0.1698/src/config.mk.in2017-07-07 11:53:29.507876589 +0200 --- src/config.mk.in2018-04-11 22:14:38.354100550 +0200 *** *** 65,78 PYTHON_OBJ= @PYTHON_OBJ@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ - PYTHON_CONFDIR= @PYTHON_CONFDIR@ - PYTHON_GETPATH_CFLAGS = @PYTHON_GETPATH_CFLAGS@ PYTHON3_SRC = @PYTHON3_SRC@ PYTHON3_OBJ = @PYTHON3_OBJ@ PYTHON3_CFLAGS= @PYTHON3_CFLAGS@ PYTHON3_LIBS = @PYTHON3_LIBS@ - PYTHON3_CONFDIR = @PYTHON3_CONFDIR@ TCL = @vi_cv_path_tcl@ TCL_SRC = @TCL_SRC@ --- 65,75 *** ../vim-8.0.1698/src/configure.ac2018-04-10 20:26:14.267224512 +0200 --- src/configure.ac2018-04-11 22:14:38.354100550 +0200 *** *** 1211,1221 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python" fi else ! if test "${vi_cv_var_python_version}" = "1.4"; then ! vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a" ! else ! vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" ! fi dnl -- Check if the path contained in python_LINKFORSHARED is dnlusable for vim build. If not, make and try other dnlcandidates. --- 1211,1217 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python" fi else ! vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" dnl -- Check if the path contained in python_LINKFORSHARED is dnlusable for vim build. If not, make and try other dnlcandidates. *** *** 1262,1271 fi PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" - if test "${vi_cv_var_python_version}" = "1.4"; then - PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" - fi - PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" dnl On FreeBSD linking with "-pthread" is required to use threads. dnl _THREAD_SAFE must be used for compiling then. --- 1258,1263 *** *** 1334,1342 fi fi - AC_SUBST(PYTHON_CONFDIR) AC_SUBST(PYTHON_LIBS) - AC_SUBST(PYTHON_GETPATH_CFLAGS) AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_SRC) AC_SUBST(PYTHON_OBJ) --- 1326,1332 *** *** 1542,1548 fi fi - AC_SUBST(PYTHON3_CONFDIR) AC_SUBST(PYTHON3_LIBS) AC_SUBST(PYTHON3_CFLAGS) AC_SUBST(PYTHON3_SRC) --- 1532,1537 *** *** 4382,4388 dnl consistent value. It's therefore safest to force the use of the define dnl if it's present in any of the *_CFLAGS variables. AC_MSG_CHECKING(whether we need to force -D_FILE_OFFSET_BITS=64) ! if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_GETPATH_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then AC_MSG_RESULT(yes) AC_DEFINE(_FILE_OFFSET_BITS, 64) else --- 4371,4377 dnl consistent value. It's therefore safest to force the use of the define dnl if it's present in any of the *_CFLAGS variables. AC_MSG_CHECKING(whether we need to force -D_FILE_OFFSET_BITS=64) !
Re: Patch 8.0.1677
On 10-Apr.-2018 20:42, Bram Moolenaar wrote: John Marriott wrote: On 08-Apr.-2018 21:08, Bram Moolenaar wrote: Patch 8.0.1677 Problem:No compiler warning for wrong format in vim_snprintf(). Solution: Add printf attribute for gcc. Fix reported problems. Files: src/vim.h, src/proto.h, src/eval.c, src/fileio.c, src/mbyte.c, src/ops.c, src/spellfile.c, src/undo.c, src/json.c After this patch (and 8.0.1679 as well) mingw (32 and 64 bit) throws these warnings: Hmm, looks like the attribute isn't implemented correctly for MinGW. I'll change the #ifdef to exclude it there. Hi Bram, Patch 1681 fixes it for me. Thanks John -- -- 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. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1698
Patch 8.0.1698 Problem:Coverate statistics don't work on coveralls. Solution: Use curly braces for $SRCDIR. Files: .travis.yml *** ../vim-8.0.1697/.travis.yml 2018-04-11 10:06:00.727165093 +0200 --- .travis.yml 2018-04-11 21:01:42.849882563 +0200 *** *** 108,114 - if [ -n "$err" ]; then exit 1; fi after_success: ! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -i $SRCDIR/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi ! - if [ "$COVERAGE" = "yes" ]; then cd $SRCDIR && bash <(curl -s https://codecov.io/bash) ; fi # vim:set sts=2 sw=2 tw=0 et: --- 108,114 - if [ -n "$err" ]; then exit 1; fi after_success: ! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -i ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi ! - if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi # vim:set sts=2 sw=2 tw=0 et: *** ../vim-8.0.1697/src/version.c 2018-04-11 20:53:45.765218228 +0200 --- src/version.c 2018-04-11 21:02:35.801514677 +0200 *** *** 764,765 --- 764,767 { /* Add new patch number below this line */ + /**/ + 1698, /**/ -- hundred-and-one symptoms of being an internet addict: 162. You go outside and look for a brightness knob to turn down the sun. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1697
Patch 8.0.1697 Problem:Various tests are still a bit flaky. Solution: Increase the default wait time to five seconds. Files: src/testdir/shared.vim, src/testdir/screendump.vim, src/testdir/test_channel.vim, src/testdir/test_clientserver.vim, src/testdir/test_quotestar.vim, src/testdir/test_terminal.vim *** ../vim-8.0.1696/src/testdir/shared.vim 2018-03-13 15:43:43.104617314 +0100 --- src/testdir/shared.vim 2018-04-11 20:44:36.633158021 +0200 *** *** 113,126 endif endfunc ! " Wait for up to a second for "expr" to become true. "expr" can be a " stringified expression to evaluate, or a funcref without arguments. " A second argument can be used to specify a different timeout in msec. " " Return time slept in milliseconds. With the +reltime feature this can be " more than the actual waiting time. Without +reltime it can also be less. func WaitFor(expr, ...) ! let timeout = get(a:000, 0, 1000) " using reltime() is more accurate, but not always available if has('reltime') let start = reltime() --- 113,126 endif endfunc ! " Wait for up to five seconds for "expr" to become true. "expr" can be a " stringified expression to evaluate, or a funcref without arguments. " A second argument can be used to specify a different timeout in msec. " " Return time slept in milliseconds. With the +reltime feature this can be " more than the actual waiting time. Without +reltime it can also be less. func WaitFor(expr, ...) ! let timeout = get(a:000, 0, 5000) " using reltime() is more accurate, but not always available if has('reltime') let start = reltime() *** ../vim-8.0.1696/src/testdir/screendump.vim 2018-04-10 21:43:22.422651857 +0200 --- src/testdir/screendump.vim 2018-04-11 20:46:20.308400032 +0200 *** *** 60,67 call assert_equal([rows, cols], term_getsize(buf)) " Wait for "All" of the ruler in the status line to be shown. ! " This can be quite slow (e.g. when using valgrind), wait up to 4 seconds. ! call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1}, 4000) return buf endfunc --- 60,67 call assert_equal([rows, cols], term_getsize(buf)) " Wait for "All" of the ruler in the status line to be shown. ! " This can be quite slow (e.g. when using valgrind). ! call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1}) return buf endfunc *** *** 70,76 func StopVimInTerminal(buf) call assert_equal("running", term_getstatus(a:buf)) call term_sendkeys(a:buf, "\\:qa!\") ! call WaitFor('term_getstatus(' . a:buf . ') == "finished"', 3000) only! endfunc --- 70,76 func StopVimInTerminal(buf) call assert_equal("running", term_getstatus(a:buf)) call term_sendkeys(a:buf, "\\:qa!\") ! call WaitFor('term_getstatus(' . a:buf . ') == "finished"') only! endfunc *** ../vim-8.0.1696/src/testdir/test_channel.vim2018-04-07 13:22:15.566979906 +0200 --- src/testdir/test_channel.vim2018-04-11 20:47:09.992039738 +0200 *** *** 1143,1149 let job = job_start([s:python, '-c', \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(1)]'], options) call assert_equal("run", job_status(job)) ! call WaitFor('len(join(getline(1, "$"), "")) >= 1', 3000) try let totlen = 0 for line in getline(1, '$') --- 1143,1149 let job = job_start([s:python, '-c', \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(1)]'], options) call assert_equal("run", job_status(job)) ! call WaitFor('len(join(getline(1, "$"), "")) >= 1') try let totlen = 0 for line in getline(1, '$') *** *** 1506,1512 let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0} let job = job_start([s:python, '-c', 'import time;time.sleep(0.5)'], {'exit_cb': 'MyExitTimeCb'}) let g:exit_cb_val.process = job_info(job).process ! call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0', 2000) let elapsed = reltimefloat(g:exit_cb_val.end) call assert_true(elapsed > 0.5) call assert_true(elapsed < 1.0) --- 1506,1512 let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0} let job = job_start([s:python, '-c', 'import time;time.sleep(0.5)'], {'exit_cb': 'MyExitTimeCb'}) let g:exit_cb_val.process = job_info(job).process ! call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0') let elapsed = reltimefloat(g:exit_cb_val.end) call assert_true(elapsed > 0.5) call assert_true(elapsed < 1.0) *** ../vim-8.0.1696/src/testdir/test_clientserver.vim 2017-11-04 19:24:24.754197129 +0100 --- src/testdir/test_clientserver.vim 2018-04-11 20:47:17.179987756 +0200 *** *** 32,38 " Takes a short while for the server
Re: Patch 8.0.1693
On Mi, 11 Apr 2018, Bram Moolenaar wrote: > I added the -i argument, but now coveralls shows no coverage at all Yeah, I saw that, not sure what is going on. I asked support about it. Best, Christian -- Ich habe mir nie meine Erziehung durch Schulbildung verderben lassen. -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.0.1693
Christian wrote: > > > On Di, 10 Apr 2018, Bram Moolenaar wrote: > > > > > > > > > > > Patch 8.0.1693 > > > > Problem:Xxd is excluded from coverage statistics. > > > > Solution: Don't skip the xxd directory. (Christian Brabandt) > > > > Files: .travis.yml > > > > > > I think this is still not working correctly. > > > > > > >From https://api.travis-ci.org/v3/job/364771625/log.txt > > > Coverage: > > > File 'xxd.c' > > > Lines executed:58.03% of 355 > > > Creating 'xxd.c.gcov' > > > Cannot open source file xxd.c > > > > > > Codecov: > > > File 'xxd.c' > > > Lines executed:58.03% of 355 > > > Branches executed:76.17% of 428 > > > Taken at least once:50.23% of 428 > > > Calls executed:31.72% of 145 > > > Creating 'xxd.c.gcov' > > > Cannot open source file xxd.c > > > > > > Don't know why this is happening (but e.g. working for libvterm). > > > > The libvterm files are build from the main src directory, xxd is in > > src/xxd. Apparently it doesn't know about the xxd subdirectory. > > I see. In fact, codecov.io did collect the coverage statistics already: > https://codecov.io/gh/vim/vim/src/master/src/xxd/xxd.c > > > Is it possible to specify two build directories? > > > Kind of, so I think there is a workaround. Currently coveralls fails with > this error: > https://api.travis-ci.org/v3/job/364785069/log.txt > , > | Traceback (most recent call last): > | File "/home/travis/.local/bin/coveralls", line 11, in > | sys.exit(run()) > | File > "/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/__init__.py", > line 97, in run > | cov_report = coverage.collect(args) > | File > "/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/coverage.py", > line 447, in collect > | with io.open(source_file_path, mode='rb') as src_file: > | IOError: [Errno 2] No such file or directory: './src/xxd.c' > ` > > This is what is run currently (whithout the verbose and dry-run parameters): > ~/.local/bin/coveralls --verbose --dryrun -b ./src -x .xs -e ./src/if_perl.c > --encodings utf-8 latin-1 EUC-KR > and this produces: > , > | [...] > | File 'xxd.c' > | Lines executed:14.57% of 357 > | Creating 'xxd.c.gcov' > | Cannot open source file xxd.c > | > | Traceback (most recent call last): > | File "/home/chrisbra/.local/bin/coveralls", line 11, in > | sys.exit(run()) > | File > "/home/chrisbra/.local/lib/python2.7/site-packages/cpp_coveralls/__init__.py", > line 97, in run > | cov_report = coverage.collect(args) > | File > "/home/chrisbra/.local/lib/python2.7/site-packages/cpp_coveralls/coverage.py", > line 447, in collect > | with io.open(source_file_path, mode='rb') as src_file: > | IOError: [Errno 2] No such file or directory: './src/xxd.c' > ` > > >From my testing this seems to work adding the `-i ./src/xxd` parameter > > using the -i parameter you should be able to get rid of the crash, however it > still reports it cannot open xxd.c > ~/.local/bin/coveralls --verbose --dryrun -b ./src -i ./src/xxd -x .xs -e > ./src/if_perl.c --encodings utf-8 latin-1 EUC-KR I added the -i argument, but now coveralls shows no coverage at all > , > | File 'xxd.c' > | Lines executed:14.57% of 357 > | Creating 'xxd.c.gcov' > | Cannot open source file xxd.c > ` > > This might already work, if not, we might need to link src/xxd/xxd.c to > src/xxd.c Then I got rid of the "Cannot open source file" message. > > I also asked for advice on the cpp-coveralls github project, but there > doesn't seem to be very much activity, so I don't know if I will receive an > answer. -- hundred-and-one symptoms of being an internet addict: 161. You get up before the sun rises to check your e-mail, and you find yourself in the very same chair long after the sun has set. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1696
Patch 8.0.1696 Problem:Coverate statistics don't work. Solution: Include the xxd directory. (Christian Brabandt) Files: .travis.yml *** ../vim-8.0.1695/.travis.yml 2018-04-10 21:16:28.214741517 +0200 --- .travis.yml 2018-04-11 10:04:43.931701728 +0200 *** *** 108,114 - if [ -n "$err" ]; then exit 1; fi after_success: ! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi - if [ "$COVERAGE" = "yes" ]; then cd $SRCDIR && bash <(curl -s https://codecov.io/bash) ; fi # vim:set sts=2 sw=2 tw=0 et: --- 108,114 - if [ -n "$err" ]; then exit 1; fi after_success: ! - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -i $SRCDIR/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi - if [ "$COVERAGE" = "yes" ]; then cd $SRCDIR && bash <(curl -s https://codecov.io/bash) ; fi # vim:set sts=2 sw=2 tw=0 et: *** ../vim-8.0.1695/src/version.c 2018-04-10 21:46:06.029475449 +0200 --- src/version.c 2018-04-11 10:05:47.439257899 +0200 *** *** 764,765 --- 764,767 { /* Add new patch number below this line */ + /**/ + 1696, /**/ -- hundred-and-one symptoms of being an internet addict: 160. You get in the elevator and double-click the button for the floor you want. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.0.1693
On Di, 10 Apr 2018, Bram Moolenaar wrote: > > Christian wrote: > > > On Di, 10 Apr 2018, Bram Moolenaar wrote: > > > > > > > > Patch 8.0.1693 > > > Problem:Xxd is excluded from coverage statistics. > > > Solution: Don't skip the xxd directory. (Christian Brabandt) > > > Files: .travis.yml > > > > I think this is still not working correctly. > > > > >From https://api.travis-ci.org/v3/job/364771625/log.txt > > Coverage: > > File 'xxd.c' > > Lines executed:58.03% of 355 > > Creating 'xxd.c.gcov' > > Cannot open source file xxd.c > > > > Codecov: > > File 'xxd.c' > > Lines executed:58.03% of 355 > > Branches executed:76.17% of 428 > > Taken at least once:50.23% of 428 > > Calls executed:31.72% of 145 > > Creating 'xxd.c.gcov' > > Cannot open source file xxd.c > > > > Don't know why this is happening (but e.g. working for libvterm). > > The libvterm files are build from the main src directory, xxd is in > src/xxd. Apparently it doesn't know about the xxd subdirectory. I see. In fact, codecov.io did collect the coverage statistics already: https://codecov.io/gh/vim/vim/src/master/src/xxd/xxd.c > Is it possible to specify two build directories? Kind of, so I think there is a workaround. Currently coveralls fails with this error: https://api.travis-ci.org/v3/job/364785069/log.txt , | Traceback (most recent call last): | File "/home/travis/.local/bin/coveralls", line 11, in | sys.exit(run()) | File "/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/__init__.py", line 97, in run | cov_report = coverage.collect(args) | File "/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/coverage.py", line 447, in collect | with io.open(source_file_path, mode='rb') as src_file: | IOError: [Errno 2] No such file or directory: './src/xxd.c' ` This is what is run currently (whithout the verbose and dry-run parameters): ~/.local/bin/coveralls --verbose --dryrun -b ./src -x .xs -e ./src/if_perl.c --encodings utf-8 latin-1 EUC-KR and this produces: , | [...] | File 'xxd.c' | Lines executed:14.57% of 357 | Creating 'xxd.c.gcov' | Cannot open source file xxd.c | | Traceback (most recent call last): | File "/home/chrisbra/.local/bin/coveralls", line 11, in | sys.exit(run()) | File "/home/chrisbra/.local/lib/python2.7/site-packages/cpp_coveralls/__init__.py", line 97, in run | cov_report = coverage.collect(args) | File "/home/chrisbra/.local/lib/python2.7/site-packages/cpp_coveralls/coverage.py", line 447, in collect | with io.open(source_file_path, mode='rb') as src_file: | IOError: [Errno 2] No such file or directory: './src/xxd.c' ` >From my testing this seems to work adding the `-i ./src/xxd` parameter using the -i parameter you should be able to get rid of the crash, however it still reports it cannot open xxd.c ~/.local/bin/coveralls --verbose --dryrun -b ./src -i ./src/xxd -x .xs -e ./src/if_perl.c --encodings utf-8 latin-1 EUC-KR , | File 'xxd.c' | Lines executed:14.57% of 357 | Creating 'xxd.c.gcov' | Cannot open source file xxd.c ` This might already work, if not, we might need to link src/xxd/xxd.c to src/xxd.c Then I got rid of the "Cannot open source file" message. I also asked for advice on the cpp-coveralls github project, but there doesn't seem to be very much activity, so I don't know if I will receive an answer. Best, Christian -- Was ist der Unterschied zwischen einem Alkoholiker und Windows 95? Beide stürzten regelmäßig ab. -- -- 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. For more options, visit https://groups.google.com/d/optout.