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

[PATCH v2 0/2] t9811: reformat and modernize tests

From
MLMarcelo Machado Lage <marcelomlage@usp.br>
Date
Jul 11, 2026, 16:04 UTC
Message-ID
<20260711160447.99708-1-marcelomlage@usp.br>
In-Reply-To
<20260702140704.65805-1-marcelomlage@usp.br>
This patch series reformats and modernizes the t9811 tests.
Changes since v1:
- Break long && chains into multiple lines according to how git tests are
  written nowadays. This was suggested by Patrick Steinhardt.
- Replace 'test -f' calls by more useful 'test_path_*' helpers as the
  second commit in the series.
Marcelo Machado Lage (2):
  t9811: break long && chains into multiple lines
  t9811: replace 'test -f' and '! test -f' with 'test_path_*'
 t/t9811-git-p4-label-import.sh | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)
Range-diff against v1:
-:  ---------- > 1:  0f03c913eb t9811: break long && chains into multiple lines
1:  f319f2e6e7 ! 2:  3e590881c3 t9811: replace 'test -f' and '! test -f' with 'test_path_*'
    @@ Commit message
     
         Replace the basic shell commands 'test -f', with more modern test
         helpers 'test_path_is_file' and 'test_path_is_missing'.
    +    These modern helpers emit useful information when the corresponding
    +    tests fail, unlike 'test -f' and '! test -f'.
    +
    +    The occurrences of '! test -f filename' were replaced by
    +    'file_path_is_missing filename', a stronger guarantee equivalent to
    +    '! test -e filename'.
    +
    +    Co-authored-by: Vinicius Lira de Freitas <vinilira@usp.br>
    +    Signed-off-by: Vinicius Lira de Freitas <vinilira@usp.br>
    +    Signed-off-by: Marcelo Machado Lage <marcelomlage@usp.br>
     
      ## t/t9811-git-p4-label-import.sh ##
     @@ t/t9811-git-p4-label-import.sh: test_expect_success 'basic p4 labels' '
    @@ t/t9811-git-p4-label-import.sh: test_expect_success 'basic p4 labels' '
     -		! test -f f2 &&
     +		test_path_is_missing f2 &&
      		git checkout TAG_WITH\$_SHELL_CHAR &&
    --		test -f f1 && test -f f2 && test -f file_with_\$metachar &&
    -+		test_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\$metachar &&
    +-		test -f f1 &&
    +-		test -f f2 &&
    +-		test -f file_with_\$metachar &&
    ++		test_path_is_file f1 &&
    ++		test_path_is_file f2 &&
    ++		test_path_is_file file_with_\$metachar &&
      
      		git show TAG_LONG_LABEL | grep -q "A Label second line"
      	)
-- 
2.34.1
Previous: Patrick SteinhardtNext: Marcelo Machado Lage
Message 6 of 9 in “t9811: replace 'test -f' and '! test -f' with 'test_path_*'”
  1. t9811: replace 'test -f' and '! test -f' with 'test_path_*'Marcelo Machado Lage, Jul 2, 2026
  2. Patrick SteinhardtJul 3, 2026
  3. Junio C HamanoJul 3, 2026
  4. Marcelo Machado LageJul 6, 2026
  5. Patrick SteinhardtJul 7, 2026
  6. 0/2 t9811: reformat and modernize testsMarcelo Machado Lage, Jul 11, 2026
  7. 1/2 t9811: break long && chains into multiple linesMarcelo Machado Lage, Jul 11, 2026
  8. 2/2 t9811: replace 'test -f' and '! test -f' with 'test_path_*'Marcelo Machado Lage, Jul 11, 2026
  9. Patrick SteinhardtJul 13, 2026

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.