Re: [PATCH 2/8] tests: always test fetch of unreachable with v0

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

 



On Fri, Feb 22, 2019 at 12:47:42PM -0800, Junio C Hamano wrote:

> >> We can do so now either by "blaming" one and finding the originating
> >> commit, or by searching for "support fetching unadvertised objects" (I
> >> used the same comment everywhere in the commit [1] so that people can do
> >> this), but I don't know how to enforce this for future work. (We can add
> >> a special variable, but I think it's unnecessary and we can't enforce
> >> that people use that new special variable instead of
> >> GIT_TEST_PROTOCOL_VERSION anyway.)
> >
> > Yeah, I think we can find them once we know they need fixing. I was more
> > wondering whether we would remember to do so. I.e., is there a way the
> > test suite could remind us when our assumptions change. I can't think of
> > an easy way to do so, though.
> 
> Perhaps looking it a different way may help.  Instead of saying "v2
> will not protect unreachable objects, so this test must be run with
> v0", think of it like "Git ought to protect unreachable objects, so
> test with different versions of protocols to make sure all satisfy
> the requirement---for now, v2 is known to be broken, so write it
> with test_expect_failure".  IOW, have one test for each version,
> some of them may document a known breakage.

Ah, yeah, that would work. It means writing out the test twice, once for
each protocol version. But if we're explicitly expecting two different
behaviors, then that's exactly what we ought to be doing.

I'm still not sure if there's consensus on whether the v2 behavior is a
problem or not, though.

-Peff



[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