All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org
Subject: Re: [JGIT PATCH 6/5 v2] Add tests for RevWalk and its supporting code
Date: Mon, 16 Mar 2009 07:33:59 -0700	[thread overview]
Message-ID: <20090316143359.GM22920@spearce.org> (raw)
In-Reply-To: <200903151234.36812.robin.rosenberg.lists@dewire.com>

Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> 
> A few /09 interesting/ places in StartGenerator are not covered by the tests.
> 
> 		if (q instanceof DateRevQueue)
> 			pending = (DateRevQueue)q;
> 		else
> -->			pending = new DateRevQueue(q);

This one is difficult to test.  Near as I can tell from the code
in the revwalk package, it never happens.  But if we did get here
with a non date rev queue, DateRevQueue()'s constructor can copy
the data from q over to one with no risk.

Perhaps just test this constructor in isolation?

> and
> 
> 		if (tf != TreeFilter.ALL) {
> -->			rf = AndRevFilter.create(rf, new RewriteTreeFilter(w, tf));
> -->			pendingOutputType |= HAS_REWRITE | NEEDS_REWRITE;
> 		}

That says we have no tests on the path filter code.  Adding one is
likely to identify at least one bug.  Clearly we need additional
tests on the path filter sections.  And it isn't just for this one
little conditional; the entire RewriteTreeFilter and RewriteGenerator
are untested right now.

I can work on adding more test coverage here, but its not in the
critical path for me at day-job right now.  The other problems I
tried to address in this series were.  So its lower in my queue
so-to-speak.  But I'll see what I can do in the near future to
write additional tests for this area of the revwalk package.
 
> PendingGenerator
> 						if (n != null && n.commitTime >= last.commitTime) {
> 							// This is too close to call. The next commit we
> 							// would pop is dated after the last one produced.
> 							// We have to keep going to ensure that we carry
> 							// flags as much as necessary.
> 							//
> -->							overScan = OVER_SCAN;

*sigh*  We never get here in the test suite? I missed that.  I'll try to
work out a test case today and send an additional patch to get coverage
here.  I thought RevWalkCullTest testProperlyCullAllAncestors1() would
be hitting here.  It doesn't.
 
> I'll merge it anyway since this is still a huge improvement compared to the previous
> state.

Thanks.

A co-worker and I are also currently trying to track down a deadlock
between C git-fetch and JGit upload-pack.  Both get stuck waiting
for the other to answer.  Clearly its JGit's fault.

-- 
Shawn.

      reply	other threads:[~2009-03-16 14:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13  2:07 [JGIT PATCH 0/5] RevWalk fixes for UNINTERESTING Shawn O. Pearce
2009-03-13  2:07 ` [JGIT PATCH 1/5] Show critical flags in debug toString() descriptions of rev queues Shawn O. Pearce
2009-03-13  2:07   ` [JGIT PATCH 2/5] Make RevObject.getType implementations final Shawn O. Pearce
2009-03-13  2:07     ` [JGIT PATCH 3/5] Remove the horribly stupid RevSort.START_ORDER Shawn O. Pearce
2009-03-13  2:07       ` [JGIT PATCH 4/5] Fix RevWalk with Linus Torvald's occasional bad commit date hack Shawn O. Pearce
2009-03-13  2:07         ` [JGIT PATCH 5/5] Avoid incorrect output of UNINTERESTING commits when clock skew occurs Shawn O. Pearce
2009-03-14  0:54         ` [JGIT PATCH 4/5 v2] Fix RevWalk with Linus Torvald's occasional bad commit date hack Shawn O. Pearce
2009-03-13 20:00 ` [JGIT PATCH 0/5] RevWalk fixes for UNINTERESTING Robin Rosenberg
2009-03-13 22:39   ` [JGIT PATCH 0/6] Add tests for RevWalk and its supporting code Shawn O. Pearce
2009-03-14  0:13     ` Shawn O. Pearce
2009-03-14  0:56       ` [JGIT PATCH 6/5 v2] " Shawn O. Pearce
2009-03-15 11:34         ` Robin Rosenberg
2009-03-16 14:33           ` Shawn O. Pearce [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

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

  git send-email \
    --in-reply-to=20090316143359.GM22920@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg.lists@dewire.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.