Re: [PATCH 0/4] Coverage support revisited
Jens Lehmann writes: > Am 13.05.2013 23:27, schrieb Thomas Rast: >> Jens asked me at git-merge if coverage support was still available. >> Turns out it is, but there were some weirdnesses. So this should fix >> them. It is relly slow as you still have to run the tests one by >> one; despite claims in the wild that it is multiprocess- safe but >> thread-unsafe, I am in fact observing the opposite behavior pretty >> clearly. (As before, it switches to sequential tests automatically, >> so you have to edit the Makefile if you want to try with parallel >> tests.) > > Thx! That might explain why the coverage run I tried today didn't > work (I saw bogus test failures). Indeed it does. I should have mentioned it in the cover letter; it's fixed by this series but if you set DEFAULT_TEST_TARGET=prove like everyone else, it ignored the (existing) force-to-sequential rule. >> unpack-trees.c: verify_clean_submodule > > This is the one I was after. While discussing my recursive update > code with Peff on Saturday we wondered if that function would ever > be called. I'll check if the tests are missing some relevant cases, > if that function can be removed or some refactoring is necessary. > > Hmm, while function coverage is already extremely useful me thinks > lcov support would be really nice. We'd have line and branch coverage, > which help me a lot in finding dead code and missing tests at $DAYJOB > ... will look into that when I have the recursive update ready. Actually if you run it, it generates submodule.c.gcov as an intermediate step to the uncovered-functions list. Of course you can also use any other tool that can read gcov; the results are cleaned before the run, not after, so they will remain in place. Originally I hacked together an uncovered-functions list because that list was so long that looking at things in even more detail seemed extremely pointless. -- Thomas Rast trast@{inf,student}.ethz.ch -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/4] Coverage support revisited
Am 13.05.2013 23:27, schrieb Thomas Rast: > Jens asked me at git-merge if coverage support was still available. > Turns out it is, but there were some weirdnesses. So this should fix > them. It is relly slow as you still have to run the tests one by > one; despite claims in the wild that it is multiprocess- safe but > thread-unsafe, I am in fact observing the opposite behavior pretty > clearly. (As before, it switches to sequential tests automatically, > so you have to edit the Makefile if you want to try with parallel > tests.) Thx! That might explain why the coverage run I tried today didn't work (I saw bogus test failures). > Below is the coverage-untested-functions output; it seems submodule.c > is covered, so there is nothing for Jens to do ;-) Hehe, I kinda expected that part ;-) > unpack-trees.c: verify_clean_submodule This is the one I was after. While discussing my recursive update code with Peff on Saturday we wondered if that function would ever be called. I'll check if the tests are missing some relevant cases, if that function can be removed or some refactoring is necessary. Hmm, while function coverage is already extremely useful me thinks lcov support would be really nice. We'd have line and branch coverage, which help me a lot in finding dead code and missing tests at $DAYJOB ... will look into that when I have the recursive update ready. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/4] Coverage support revisited
Thomas Rast writes: > Below is the coverage-untested-functions output; it seems submodule.c > is covered, so there is nothing for Jens to do ;-) Nice. Here are some hints to add coverages to the selected functions. > alloc.c: report > alloc.c: alloc_report I believe these are only for debugging. > archive-tar.c: write_extended_header Need to create an archive that contains loong pathname (iirc, over 100 bytes) in the test. > attr.c: git_etc_gitattributes > builtin#add.c: ignore_removal_cb "--ignore-removal" option parsing. > builtin#apply.c: checkout_target Try "git apply --index" to an empty working tree with a valid index. > builtin#apply.c: add_name_limit > builtin#apply.c: option_parse_exclude > builtin#apply.c: option_parse_include "git apply --exclude/include". > builtin#apply.c: option_parse_z "git apply --stat -z". > builtin#blame.c: read_ancestry "git blame -S". > builtin#blame.c: sanity_check_refcnt Only used for debugging. > builtin#blame.c: prepare_initial "git blame --reverse". > builtin#blame.c: blame_move_callback "git blame -M" (option parsing). > varint.c: decode_varint > varint.c: encode_varint "git update-index --index-version 4" and then read from the resulting index. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/4] Coverage support revisited
Jens asked me at git-merge if coverage support was still available. Turns out it is, but there were some weirdnesses. So this should fix them. It is relly slow as you still have to run the tests one by one; despite claims in the wild that it is multiprocess- safe but thread-unsafe, I am in fact observing the opposite behavior pretty clearly. (As before, it switches to sequential tests automatically, so you have to edit the Makefile if you want to try with parallel tests.) Below is the coverage-untested-functions output; it seems submodule.c is covered, so there is nothing for Jens to do ;-) Thomas Rast (4): coverage: split build target into compile and test coverage: do not delete .gcno files before building coverage: set DEFAULT_TEST_TARGET to avoid using prove coverage: build coverage-untested-functions by default Makefile | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) --- coverage-untested-functions --- alloc.c: report alloc.c: alloc_report archive-tar.c: write_extended_header attr.c: git_etc_gitattributes builtin#add.c: ignore_removal_cb builtin#apply.c: checkout_target builtin#apply.c: add_name_limit builtin#apply.c: option_parse_exclude builtin#apply.c: option_parse_include builtin#apply.c: option_parse_z builtin#blame.c: read_ancestry builtin#blame.c: sanity_check_refcnt builtin#blame.c: prepare_initial builtin#blame.c: blame_move_callback builtin#branch.c: calc_maxwidth builtin#checkout-index.c: option_parse_z builtin#clone.c: remove_junk_on_signal builtin#commit.c: find_author_by_nickname builtin#config.c: cmd_repo_config builtin#fetch.c: unlock_pack_on_signal builtin#fmt-merge-msg.c: add_branch_desc builtin#for-each-ref.c: copy_advance builtin#grep.c: help_callback builtin#help.c: parse_help_format builtin#help.c: get_man_viewer_info builtin#help.c: check_emacsclient_version builtin#help.c: exec_woman_emacs builtin#help.c: exec_man_konqueror builtin#help.c: exec_man_man builtin#help.c: exec_man_cmd builtin#help.c: add_man_viewer builtin#help.c: supported_man_viewer builtin#help.c: do_add_man_viewer_info builtin#help.c: add_man_viewer_path builtin#help.c: add_man_viewer_cmd builtin#help.c: add_man_viewer_info builtin#help.c: git_help_config builtin#help.c: is_git_command builtin#help.c: prepend builtin#help.c: cmd_to_page builtin#help.c: setup_man_path builtin#help.c: exec_viewer builtin#help.c: show_man_page builtin#help.c: show_info_page builtin#help.c: get_html_page_path builtin#help.c: open_html builtin#help.c: show_html_page builtin#help.c: list_common_guides_help builtin#help.c: cmd_help builtin#index-pack.c: delta_pos_compare builtin#log.c: estimate_commit_count builtin#log.c: show_early_header builtin#log.c: log_show_early builtin#log.c: early_output builtin#log.c: setup_early_output builtin#log.c: finish_early_output builtin#log.c: no_numbered_callback builtin#log.c: header_callback builtin#mailsplit.c: populate_maildir_list builtin#mailsplit.c: maildir_filename_cmp builtin#mailsplit.c: split_maildir builtin#merge-base.c: handle_is_ancestor builtin#merge.c: reset_hard builtin#merge.c: setup_with_upstream builtin#pack-objects.c: pbase_tree_cache_ix_incr builtin#pack-objects.c: try_to_free_from_threads builtin#pack-objects.c: mark_in_pack_object builtin#pack-objects.c: ofscmp builtin#pack-objects.c: add_objects_in_unpacked_packs builtin#pack-objects.c: option_parse_ulong builtin#pack-redundant.c: llist_item_put builtin#pack-redundant.c: llist_item_get builtin#pack-redundant.c: llist_free builtin#pack-redundant.c: llist_init builtin#pack-redundant.c: llist_copy builtin#pack-redundant.c: llist_insert builtin#pack-redundant.c: llist_insert_back builtin#pack-redundant.c: llist_insert_sorted_unique builtin#pack-redundant.c: llist_sorted_remove builtin#pack-redundant.c: llist_sorted_difference_inplace builtin#pack-redundant.c: pack_list_insert builtin#pack-redundant.c: pack_list_size builtin#pack-redundant.c: pack_list_difference builtin#pack-redundant.c: cmp_two_packs builtin#pack-redundant.c: pll_free builtin#pack-redundant.c: get_permutations builtin#pack-redundant.c: is_superset builtin#pack-redundant.c: sizeof_union builtin#pack-redundant.c: get_pack_redundancy builtin#pack-redundant.c: pack_set_bytecount builtin#pack-redundant.c: minimize builtin#pack-redundant.c: load_all_objects builtin#pack-redundant.c: cmp_local_packs builtin#pack-redundant.c: scan_alt_odb_packs builtin#pack-redundant.c: add_pack builtin#pack-redundant.c: add_pack_file builtin#pack-redundant.c: load_all builtin#pack-redundant.c: cmd_pack_redundant builtin#push.c: advise_use_upstream builtin#push.c: advise_checkout_pull_push builtin#push.c: advise_ref_needs_force builtin#read-tree.c: debug_stage builtin#read-tree.c: debug_merge builtin#reflog.c: find_cfg_ent builtin#remote-ext.c: send_git_request builtin#remote-fd.c: command_loop builtin#remote-fd.c: cmd_remote_fd builtin#rev-list.c: show_edge builtin#rev-list.c: print_var_str builtin#rev-list.c: print_var_int builtin#r