git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/5] test-lib: filesystem prerequisites

From
Jeff King <peff@peff.net>
Date
Jul 26, 2012, 18:43 UTC
Message-ID
<20120726184337.GB16037@sigill.intra.peff.net>
In-Reply-To
<7vtxwu75gy.fsf@alter.siamese.dyndns.org>
On Thu, Jul 26, 2012 at 11:16:45AM -0700, Junio C Hamano wrote:
Show 19 quoted lines
> Consolidating the logic to set necessary prerequisites used in
> various scripts is very good, but I am not sure adding them to
> test-lib and run them unconditionally is a good idea.  SYMLINKS is
> used by 47 among 595 tests, which is common enough, but the new ones
> are not common enough.  I do not think we want to create a temporary
> "junk" dir, two temporary "camelcase" files, read and compare them,
> when nobody in the script cares.
> 
> We do not have to split them into separate include files, though, in
> order to avoid such waste.  Instead, you can make the logic to set
> prerequisite conditional inside test-lib.sh and update the users.
> 
> Something like:
> [...]
> 	(at the beginning of t/t0003-attributes.sh)
> 	#!/bin/sh
>         test_description=gitattributes
>         TEST_WANT_PREREQ=CASE_INSENSITIVE_FS,SYMLINKS
> 	. ./test-lib.sh

That looks like a maintenance annoyance. Can't we just have the prerequisite-checker lazily perform the test on demand and cache the result? It should be OK as long as:

  1. The prereq is careful about its pre- and post- conditions. We
     already make sure to clean up after those tests so as not to taint
     later tests. We would probably want to also make them more careful
     about preconditions like which directory they are in (so, for
     example, refer to "$TRASH_DIRECTORY/junk" and not "junk").
  2. The prereq test does not accidentally munge any existing test
     state from previous tests. That should not be a big deal as long as
     we avoid names like "junk" in favor of more unique names like
     "check-case-sensitivity-prereq".
-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 19 in “t3910: give reason for skipping the test”
  1. t3910: give reason for skipping the testMichael J Gruber, Jul 14, 2012
  2. Torsten BögershausenJul 14, 2012
  3. 0/5 test-lib: filesystem prerequisitesMichael J Gruber, Jul 26, 2012
  4. Junio C HamanoJul 26, 2012
  5. Jeff KingJul 26, 2012
  6. Junio C HamanoJul 26, 2012
  7. Michael J GruberJul 27, 2012
  8. Junio C HamanoJul 27, 2012
  9. Michael J GruberJul 30, 2012
  10. 5/5 t3910: use the UTF8_NFD_TO_NFC test prereqMichael J Gruber, Jul 30, 2012
  11. Junio C HamanoJul 30, 2012
  12. Torsten BögershausenAug 4, 2012
  13. Junio C HamanoAug 4, 2012
  14. Michael J GruberAug 6, 2012
  15. 1/5 test-lib: provide case insensitivity as a prerequisiteMichael J Gruber, Jul 26, 2012
  16. 2/5 t0050: use the CASE_INSENSITIVE_FS test prereqMichael J Gruber, Jul 26, 2012
  17. 3/5 t0050: use the SYMLINKS test prereqMichael J Gruber, Jul 26, 2012
  18. 4/5 test-lib: provide UTF8 behaviour as a prerequisiteMichael J Gruber, Jul 26, 2012
  19. 5/5 t3910: use the SYMLINKS test prereqMichael J Gruber, Jul 26, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.