git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Git List <git@vger.kernel.org>
Subject: Re: Git Test Coverage Report (Monday, Oct 15)
Date: Mon, 15 Oct 2018 15:43:08 -0400	[thread overview]
Message-ID: <1f6513e1-24f1-496a-2f3b-6ed6e96b99d1@gmail.com> (raw)
In-Reply-To: <6be9fe04-138d-01b7-91c1-6c029ab7c9be@gmail.com>

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

      reply	other threads:[~2018-10-15 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 16:24 Git Test Coverage Report (Monday, Oct 15) Derrick Stolee
2018-10-15 19:43 ` Derrick Stolee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f6513e1-24f1-496a-2f3b-6ed6e96b99d1@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).