git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clone tests: rename t57* => t56*
@ 2016-03-15 21:25 Stefan Beller
  2016-03-15 21:51 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Beller @ 2016-03-15 21:25 UTC (permalink / raw)
  To: gitster; +Cc: git, Stefan Beller

When trying to find a good spot for testing clone with submodules, I
got confused where to add a new test file. There are both tests in t560*
as well as t57* both testing the clone command. t/README claims the
second digit is to indicate the command, which is inconsistent to the
current naming structure.

Rename all t57* tests to be in t56* to follow the pattern of the digits
as laid out in t/README.

It would have been less work to rename t56* => t57* because there are less
files, but the tests in t56* look more basic and I assumed the higher the
last digits the more complicated niche details are tested, so with the patch
now it looks more in order to me.

Signed-off-by: Stefan Beller <sbeller@google.com>
---

If there is a reason to have 2 separate spaces for clone testing,
and I missed it, we should document that why it is important to keep
them separate.

Thanks,
Stefan

 t/{t5700-clone-reference.sh => t5604-clone-reference.sh} | 0
 t/{t5701-clone-local.sh => t5605-clone-local.sh}         | 0
 t/{t5702-clone-options.sh => t5606-clone-options.sh}     | 0
 t/{t5704-bundle.sh => t5607-clone-bundle.sh}             | 0
 t/{t5705-clone-2gb.sh => t5608-clone-2gb.sh}             | 0
 t/{t5706-clone-branch.sh => t5609-clone-branch.sh}       | 0
 t/{t5707-clone-detached.sh => t5610-clone-detached.sh}   | 0
 t/{t5708-clone-config.sh => t5611-clone-config.sh}       | 0
 t/{t5709-clone-refspec.sh => t5612-clone-refspec.sh}     | 0
 t/{t5710-info-alternate.sh => t5613-info-alternate.sh}   | 0
 10 files changed, 0 insertions(+), 0 deletions(-)
 rename t/{t5700-clone-reference.sh => t5604-clone-reference.sh} (100%)
 rename t/{t5701-clone-local.sh => t5605-clone-local.sh} (100%)
 rename t/{t5702-clone-options.sh => t5606-clone-options.sh} (100%)
 rename t/{t5704-bundle.sh => t5607-clone-bundle.sh} (100%)
 rename t/{t5705-clone-2gb.sh => t5608-clone-2gb.sh} (100%)
 rename t/{t5706-clone-branch.sh => t5609-clone-branch.sh} (100%)
 rename t/{t5707-clone-detached.sh => t5610-clone-detached.sh} (100%)
 rename t/{t5708-clone-config.sh => t5611-clone-config.sh} (100%)
 rename t/{t5709-clone-refspec.sh => t5612-clone-refspec.sh} (100%)
 rename t/{t5710-info-alternate.sh => t5613-info-alternate.sh} (100%)

diff --git a/t/t5700-clone-reference.sh b/t/t5604-clone-reference.sh
similarity index 100%
rename from t/t5700-clone-reference.sh
rename to t/t5604-clone-reference.sh
diff --git a/t/t5701-clone-local.sh b/t/t5605-clone-local.sh
similarity index 100%
rename from t/t5701-clone-local.sh
rename to t/t5605-clone-local.sh
diff --git a/t/t5702-clone-options.sh b/t/t5606-clone-options.sh
similarity index 100%
rename from t/t5702-clone-options.sh
rename to t/t5606-clone-options.sh
diff --git a/t/t5704-bundle.sh b/t/t5607-clone-bundle.sh
similarity index 100%
rename from t/t5704-bundle.sh
rename to t/t5607-clone-bundle.sh
diff --git a/t/t5705-clone-2gb.sh b/t/t5608-clone-2gb.sh
similarity index 100%
rename from t/t5705-clone-2gb.sh
rename to t/t5608-clone-2gb.sh
diff --git a/t/t5706-clone-branch.sh b/t/t5609-clone-branch.sh
similarity index 100%
rename from t/t5706-clone-branch.sh
rename to t/t5609-clone-branch.sh
diff --git a/t/t5707-clone-detached.sh b/t/t5610-clone-detached.sh
similarity index 100%
rename from t/t5707-clone-detached.sh
rename to t/t5610-clone-detached.sh
diff --git a/t/t5708-clone-config.sh b/t/t5611-clone-config.sh
similarity index 100%
rename from t/t5708-clone-config.sh
rename to t/t5611-clone-config.sh
diff --git a/t/t5709-clone-refspec.sh b/t/t5612-clone-refspec.sh
similarity index 100%
rename from t/t5709-clone-refspec.sh
rename to t/t5612-clone-refspec.sh
diff --git a/t/t5710-info-alternate.sh b/t/t5613-info-alternate.sh
similarity index 100%
rename from t/t5710-info-alternate.sh
rename to t/t5613-info-alternate.sh
-- 
2.7.0.rc0.46.g8f16ed4.dirty

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clone tests: rename t57* => t56*
  2016-03-15 21:25 [PATCH] clone tests: rename t57* => t56* Stefan Beller
@ 2016-03-15 21:51 ` Jeff King
  2016-03-15 22:00   ` Stefan Beller
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2016-03-15 21:51 UTC (permalink / raw)
  To: Stefan Beller; +Cc: gitster, git

On Tue, Mar 15, 2016 at 02:25:50PM -0700, Stefan Beller wrote:

> When trying to find a good spot for testing clone with submodules, I
> got confused where to add a new test file. There are both tests in t560*
> as well as t57* both testing the clone command. t/README claims the
> second digit is to indicate the command, which is inconsistent to the
> current naming structure.
> 
> Rename all t57* tests to be in t56* to follow the pattern of the digits
> as laid out in t/README.
> 
> It would have been less work to rename t56* => t57* because there are less
> files, but the tests in t56* look more basic and I assumed the higher the
> last digits the more complicated niche details are tested, so with the patch
> now it looks more in order to me.

This seems like a good change to me. There definitely is a general sense
of "more complex things should come later" in the test suite[1], so
preserving the existing ordering seems reasonable.

> If there is a reason to have 2 separate spaces for clone testing,
> and I missed it, we should document that why it is important to keep
> them separate.

It looks like it was just carelessness from long ago. 5600 was added by
5508a616 (Feb 2006), and then t5700 in cf9dc653 (May 2006). For the
later ones, everybody probably just found or the other and built on top
(some of us even found both at various times; looks like I added t5708
in 2011 and t5603 last year).

I checked whether there were any stragglers in topics in flight with:

  git log --oneline --name-status --diff-filter=A origin..origin/pu t

but I think we are good.

-Peff

[1] I actually don't think the test ordering matters all that much. I
    guess if you run the tests directly from the Makefile, it will stop
    at the most basic test that fails.

    Personally, I run them in longest-to-shortest via "prove", which
    helps parallelism, and gives you the full list of failed tests.
    Which is often a good piece of knowledge by itself (is it just one
    test, or did I horribly break some fundamental part of git?). And
    then I pick one of the failures to study based on what seems simple
    to debug, and/or the area I've been making changes in.

    But I dunno. Maybe other people really do care about the order. It
    doesn't hurt to roughly follow the "simplest comes first" ordering.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clone tests: rename t57* => t56*
  2016-03-15 21:51 ` Jeff King
@ 2016-03-15 22:00   ` Stefan Beller
  2016-03-15 22:09     ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Beller @ 2016-03-15 22:00 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, git@vger.kernel.org

On Tue, Mar 15, 2016 at 2:51 PM, Jeff King <peff@peff.net> wrote:
> On Tue, Mar 15, 2016 at 02:25:50PM -0700, Stefan Beller wrote:
>
>> When trying to find a good spot for testing clone with submodules, I
>> got confused where to add a new test file. There are both tests in t560*
>> as well as t57* both testing the clone command. t/README claims the
>> second digit is to indicate the command, which is inconsistent to the
>> current naming structure.
>>
>> Rename all t57* tests to be in t56* to follow the pattern of the digits
>> as laid out in t/README.
>>
>> It would have been less work to rename t56* => t57* because there are less
>> files, but the tests in t56* look more basic and I assumed the higher the
>> last digits the more complicated niche details are tested, so with the patch
>> now it looks more in order to me.
>
> This seems like a good change to me. There definitely is a general sense
> of "more complex things should come later" in the test suite[1], so
> preserving the existing ordering seems reasonable.
>
>> If there is a reason to have 2 separate spaces for clone testing,
>> and I missed it, we should document that why it is important to keep
>> them separate.
>
> It looks like it was just carelessness from long ago. 5600 was added by
> 5508a616 (Feb 2006), and then t5700 in cf9dc653 (May 2006). For the
> later ones, everybody probably just found or the other and built on top
> (some of us even found both at various times; looks like I added t5708
> in 2011 and t5603 last year).
>
> I checked whether there were any stragglers in topics in flight with:
>
>   git log --oneline --name-status --diff-filter=A origin..origin/pu t
>
> but I think we are good.
>
> -Peff
>
> [1] I actually don't think the test ordering matters all that much. I
>     guess if you run the tests directly from the Makefile, it will stop
>     at the most basic test that fails.
>
>     Personally, I run them in longest-to-shortest via "prove", which
>     helps parallelism, and gives you the full list of failed tests.
>     Which is often a good piece of knowledge by itself (is it just one
>     test, or did I horribly break some fundamental part of git?). And
>     then I pick one of the failures to study based on what seems simple
>     to debug, and/or the area I've been making changes in.
>
>     But I dunno. Maybe other people really do care about the order. It
>     doesn't hurt to roughly follow the "simplest comes first" ordering.

Talking about ordering, I have two use cases

1) Before sending out patches: "git rebase -i -x make -x 'make test' <anchor>"
  to catch myself for doing stupid things.

2) When developing new code, I alternate between running an indivdual test
  "cd t && GIT_TRACE=1 ./t7400... -d -i -x -v " and running prove for all tests
  to have a good check if there are other niches I missed.

So I do not really have strong preference for the right order, I even
thought about
omitting the paragraph from the commit message and wanted to put it into
the notes below, but then I figured I want to record it as I was
frustrated about
the commit messages from 2006 as they don't answer simple questions like
"Why did you use a different second digit?", so I figured if anyone digs up my
commit eventually I want to record as much of my current reasoning even
if it is minor to help a future developer?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clone tests: rename t57* => t56*
  2016-03-15 22:00   ` Stefan Beller
@ 2016-03-15 22:09     ` Jeff King
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2016-03-15 22:09 UTC (permalink / raw)
  To: Stefan Beller; +Cc: Junio C Hamano, git@vger.kernel.org

On Tue, Mar 15, 2016 at 03:00:09PM -0700, Stefan Beller wrote:

> Talking about ordering, I have two use cases
> 
> 1) Before sending out patches: "git rebase -i -x make -x 'make test' <anchor>"
>   to catch myself for doing stupid things.
> 
> 2) When developing new code, I alternate between running an indivdual test
>   "cd t && GIT_TRACE=1 ./t7400... -d -i -x -v " and running prove for all tests
>   to have a good check if there are other niches I missed.

Yep, that is roughly my workflow, too (with the occasional "make test &&
make install" thrown in). :)

> So I do not really have strong preference for the right order, I even
> thought about omitting the paragraph from the commit message and
> wanted to put it into the notes below, but then I figured I want to
> record it as I was frustrated about the commit messages from 2006 as
> they don't answer simple questions like "Why did you use a different
> second digit?", so I figured if anyone digs up my commit eventually I
> want to record as much of my current reasoning even if it is minor to
> help a future developer?

I agree it is worth mentioning that you considered the order. I think
what you wrote was fine, though I probably would have said something
like:

  Moving t57* to higher digits in t56* preserves the existing ordering.
  That may or may not matter to anyone, but it does not hurt to keep it.

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-15 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-15 21:25 [PATCH] clone tests: rename t57* => t56* Stefan Beller
2016-03-15 21:51 ` Jeff King
2016-03-15 22:00   ` Stefan Beller
2016-03-15 22:09     ` Jeff King

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 NNTP newsgroup(s).