Re: Git Test Coverage Report (Monday, Oct 15)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/15/2018 12:24 PM, Derrick Stolee wrote:

Uncovered code in 'jch' (22f2f0f) and not in 'next' (152ad8e)
-------------------------------------------------------------

prio-queue.c
2d181390f3 94) return queue->array[queue->nr - 1].data;
(I have a fix to cover this in my private branch for this topic.)


revision.c
4943d28849 2931) return;
4943d28849 2934) return;
4943d28849 2937) c->object.flags |= UNINTERESTING;
4943d28849 2940) return;
4943d28849 2943) mark_parents_uninteresting(c);
4943d28849 2966) return;
4943d28849 2969) return;
4943d28849 2974) return;
4943d28849 3022) init_author_date_slab(&info->author_date);
4943d28849 3023) info->topo_queue.compare = compare_commits_by_author_date;
4943d28849 3024) info->topo_queue.cb_data = &info->author_date;
4943d28849 3025) break;
4943d28849 3038) continue;
4943d28849 3048) record_author_date(&info->author_date, c);
6c04ff3001 3086) if (!revs->ignore_missing_links)
6c04ff3001 3087) die("Failed to traverse parents of commit %s",
4943d28849 3088) oid_to_hex(&commit->object.oid));
4943d28849 3096) continue;
Looks like a number of these lines are important to cover, but are not covered by tests that _also_ specify '--topo-order'. I bet I can cover more of these by overriding the sort logic to use the new algorithm if GIT_TEST_COMMIT_GRAPH is specified. Or, should I create yet another test variable to cover these cases?

(Note: I run these coverage reports with a variety of optional test variables.)

Uncovered code in 'next' (152ad8e) and not in 'master' (5a0cc8a)
----------------------------------------------------------------
builtin/rev-list.c
7c0fe330d5 builtin/rev-list.c 227) die("unexpected missing %s object '%s'", 7c0fe330d5 builtin/rev-list.c 228)     type_name(obj->type), oid_to_hex(&obj->oid));

commit-graph.c
5cef295f28   67) return 0;
20fd6d5799   79) return 0;
These are two ways to say the commit-graph should not be used, but are not covered by tests currently. One is if we say "is the repo shallow?" which happens to return when the repo has grafts (but we keep the check here in case the way shallows are implemented changes) and the other is if the repo is not initialized, but I fixed the test-helpers that had not initialized the repo yet.

Uncovered code in 'master' (5a0cc8a) and not in (fe8321ec05)
-----------------------------------------------------------------
builtin/fsck.c
66ec0390e7 builtin/fsck.c 862) midx_argv[2] = "--object-dir";
66ec0390e7 builtin/fsck.c 863) midx_argv[3] = alt->path;
66ec0390e7 builtin/fsck.c 864) if (run_command(&midx_verify))
66ec0390e7 builtin/fsck.c 865) errors_found |= ERROR_COMMIT_GRAPH;
These are underneath the "for all alternates" loop, and _should_ be covered with the coming GIT_TEST_MULTI_PACK_INDEX test variable.

Thanks,
-Stolee



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux