{"thread":{"id":"65914","subject":"[PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*'","startedAt":"2026-07-02T14:07:26Z","lastAt":"2026-07-13T11:10:43Z","messageCount":9,"participants":["Marcelo Machado Lage","Patrick Steinhardt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"546998","messageId":"20260702140704.65805-1-marcelomlage@usp.br","threadId":"65914","inReplyTo":null,"subject":"[PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*'","fromName":"Marcelo Machado Lage","fromEmail":"marcelomlage@usp.br","sentAt":"2026-07-02T14:07:04Z","receivedAt":"2026-07-02T14:07:26Z","isPatch":true,"body":"Replace the basic shell commands 'test -f', with more modern test\nhelpers 'test_path_is_file' and 'test_path_is_missing'.\n\nCo-authored-by: Vinicius Lira de Freitas <vinilira@usp.br>\nSigned-off-by: Vinicius Lira de Freitas <vinilira@usp.br>\nSigned-off-by: Marcelo Machado Lage <marcelomlage@usp.br>\n---\n t/t9811-git-p4-label-import.sh | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex 7614dfbd95..93d6b4c479 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -62,9 +62,9 @@ test_expect_success 'basic p4 labels' '\n \n \t\tcd main &&\n \t\tgit checkout TAG_F1_ONLY &&\n-\t\t! test -f f2 &&\n+\t\ttest_path_is_missing f2 &&\n \t\tgit checkout TAG_WITH\\$_SHELL_CHAR &&\n-\t\ttest -f f1 && test -f f2 && test -f file_with_\\$metachar &&\n+\t\ttest_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\\$metachar &&\n \n \t\tgit show TAG_LONG_LABEL | grep -q \"A Label second line\"\n \t)\n@@ -102,11 +102,11 @@ test_expect_success 'two labels on the same changelist' '\n \n \t\tgit checkout TAG_F1_1 &&\n \t\tls &&\n-\t\ttest -f f1 &&\n+\t\ttest_path_is_file f1 &&\n \n \t\tgit checkout TAG_F1_2 &&\n \t\tls &&\n-\t\ttest -f f1\n+\t\ttest_path_is_file f1\n \t)\n '\n \n@@ -135,9 +135,9 @@ test_expect_success 'export git tags to p4' '\n \t\tp4 labels ... | grep LIGHTWEIGHT_TAG &&\n \t\tp4 label -o GIT_TAG_1 | grep \"tag created in git:xyzzy\" &&\n \t\tp4 sync ...@GIT_TAG_1 &&\n-\t\t! test -f main/f10 &&\n+\t\ttest_path_is_missing main/f10 &&\n \t\tp4 sync ...@GIT_TAG_2 &&\n-\t\ttest -f main/f10\n+\t\ttest_path_is_file main/f10\n \t)\n '\n \n@@ -168,9 +168,9 @@ test_expect_success 'export git tags to p4 with deletion' '\n \t\tcd \"$cli\" &&\n \t\tp4 sync ... &&\n \t\tp4 sync ...@GIT_TAG_ON_DELETED &&\n-\t\ttest -f main/deleted_file &&\n+\t\ttest_path_is_file main/deleted_file &&\n \t\tp4 sync ...@GIT_TAG_AFTER_DELETION &&\n-\t\t! test -f main/deleted_file &&\n+\t\ttest_path_is_missing main/deleted_file &&\n \t\techo \"checking label contents\" &&\n \t\tp4 label -o GIT_TAG_ON_DELETED | grep \"tag on deleted file\"\n \t)\n\nbase-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc\n-- \n2.34.1\n\n"},{"id":"547045","messageId":"akdwp_a2EuhVoGVW@pks.im","threadId":"65914","inReplyTo":"20260702140704.65805-1-marcelomlage@usp.br","subject":"Re: [PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*'","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-03T08:19:51Z","receivedAt":"2026-07-03T08:19:59Z","isPatch":true,"body":"On Thu, Jul 02, 2026 at 11:07:04AM -0300, Marcelo Machado Lage wrote:\n> Replace the basic shell commands 'test -f', with more modern test\n> helpers 'test_path_is_file' and 'test_path_is_missing'.\n\nNit: it might make sense to briefly mention why we do this exercise.\nLike, what does `test_path_is_file` et al give us over `test -f`?\n\n> diff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\n> index 7614dfbd95..93d6b4c479 100755\n> --- a/t/t9811-git-p4-label-import.sh\n> +++ b/t/t9811-git-p4-label-import.sh\n> @@ -62,9 +62,9 @@ test_expect_success 'basic p4 labels' '\n>  \n>  \t\tcd main &&\n>  \t\tgit checkout TAG_F1_ONLY &&\n> -\t\t! test -f f2 &&\n> +\t\ttest_path_is_missing f2 &&\n>  \t\tgit checkout TAG_WITH\\$_SHELL_CHAR &&\n> -\t\ttest -f f1 && test -f f2 && test -f file_with_\\$metachar &&\n> +\t\ttest_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\\$metachar &&\n\nWhile at it we could split this line into three lines -- it's getting\noverly long, and we typically don't chain multiple commands on one line\nnowadays.\n\n> @@ -135,9 +135,9 @@ test_expect_success 'export git tags to p4' '\n>  \t\tp4 labels ... | grep LIGHTWEIGHT_TAG &&\n>  \t\tp4 label -o GIT_TAG_1 | grep \"tag created in git:xyzzy\" &&\n>  \t\tp4 sync ...@GIT_TAG_1 &&\n> -\t\t! test -f main/f10 &&\n> +\t\ttest_path_is_missing main/f10 &&\n\nThis is a stronger guarantee compared to before, as we only checked\nwhether the path is not a file. Now we verify that it doesn't exist at\nall, which would be equivalent to `test -e`. That's a strict improvement\nthough, but may be worth pointing out in the commit message so that the\nreviewer is not surprised.\n\n> @@ -168,9 +168,9 @@ test_expect_success 'export git tags to p4 with deletion' '\n>  \t\tcd \"$cli\" &&\n>  \t\tp4 sync ... &&\n>  \t\tp4 sync ...@GIT_TAG_ON_DELETED &&\n> -\t\ttest -f main/deleted_file &&\n> +\t\ttest_path_is_file main/deleted_file &&\n>  \t\tp4 sync ...@GIT_TAG_AFTER_DELETION &&\n> -\t\t! test -f main/deleted_file &&\n> +\t\ttest_path_is_missing main/deleted_file &&\n\nSame here.\n\nOther than that the patch looks good to me, thanks!\n\nPatrick\n"},{"id":"547122","messageId":"xmqqfr1zhkak.fsf@gitster.g","threadId":"65914","inReplyTo":"akdwp_a2EuhVoGVW@pks.im","subject":"Re: [PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-03T20:48:03Z","receivedAt":"2026-07-03T20:48:05Z","isPatch":true,"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n>> -\t\ttest -f f1 && test -f f2 && test -f file_with_\\$metachar &&\n>> +\t\ttest_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\\$metachar &&\n>\n> While at it we could split this line into three lines -- it's getting\n> overly long, and we typically don't chain multiple commands on one line\n> nowadays.\n\nExcellent.\n\n>> -\t\t! test -f main/f10 &&\n>> +\t\ttest_path_is_missing main/f10 &&\n>\n> This is a stronger guarantee compared to before, as we only checked\n> whether the path is not a file. Now we verify that it doesn't exist at\n> all, which would be equivalent to `test -e`. That's a strict improvement\n> though, but may be worth pointing out in the commit message so that the\n> reviewer is not surprised.\n\nGood.\n"},{"id":"547247","messageId":"CAO=vGZpMe3dxyzFVwR7BWBxaAZ-z9Kw3CqQ0kAe5ZZGSQszkzw@mail.gmail.com","threadId":"65914","inReplyTo":"akdwp_a2EuhVoGVW@pks.im","subject":"Re: [PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*'","fromName":"Marcelo Machado Lage","fromEmail":"marcelomlage@usp.br","sentAt":"2026-07-06T15:00:00Z","receivedAt":"2026-07-06T15:00:12Z","isPatch":true,"body":"Em sex., 3 de jul. de 2026 às 05:20, Patrick Steinhardt <ps@pks.im> escreveu:\n>\n> On Thu, Jul 02, 2026 at 11:07:04AM -0300, Marcelo Machado Lage wrote:\n> > Replace the basic shell commands 'test -f', with more modern test\n> > helpers 'test_path_is_file' and 'test_path_is_missing'.\n>\n> Nit: it might make sense to briefly mention why we do this exercise.\n> Like, what does `test_path_is_file` et al give us over `test -f`?\n\nWe'll add this in v2.\n\n>\n> > diff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\n> > index 7614dfbd95..93d6b4c479 100755\n> > --- a/t/t9811-git-p4-label-import.sh\n> > +++ b/t/t9811-git-p4-label-import.sh\n> > @@ -62,9 +62,9 @@ test_expect_success 'basic p4 labels' '\n> >\n> >               cd main &&\n> >               git checkout TAG_F1_ONLY &&\n> > -             ! test -f f2 &&\n> > +             test_path_is_missing f2 &&\n> >               git checkout TAG_WITH\\$_SHELL_CHAR &&\n> > -             test -f f1 && test -f f2 && test -f file_with_\\$metachar &&\n> > +             test_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\\$metachar &&\n>\n> While at it we could split this line into three lines -- it's getting\n> overly long, and we typically don't chain multiple commands on one line\n> nowadays.\n\nWe'll do this for v2 as well and make it into a patch series to\nseparate test interface modernization from formatting changes.\n\nWhile on this, there are some other places in the file where multiple\ncommands in a && chain appear in a single line, e.g. in line 244:\n> p4 edit f2 && date >f2 && p4 submit -d \"change\" f2 &&\nShould we split these into multiple lines as well, even though they\nare under the 80 characters limit?\n\n>\n> > @@ -135,9 +135,9 @@ test_expect_success 'export git tags to p4' '\n> >               p4 labels ... | grep LIGHTWEIGHT_TAG &&\n> >               p4 label -o GIT_TAG_1 | grep \"tag created in git:xyzzy\" &&\n> >               p4 sync ...@GIT_TAG_1 &&\n> > -             ! test -f main/f10 &&\n> > +             test_path_is_missing main/f10 &&\n>\n> This is a stronger guarantee compared to before, as we only checked\n> whether the path is not a file. Now we verify that it doesn't exist at\n> all, which would be equivalent to `test -e`. That's a strict improvement\n> though, but may be worth pointing out in the commit message so that the\n> reviewer is not surprised.\n\nWe overlooked this improvement at first, but we'll add a proper note\nabout it in v2.\n\n>\n> > @@ -168,9 +168,9 @@ test_expect_success 'export git tags to p4 with deletion' '\n> >               cd \"$cli\" &&\n> >               p4 sync ... &&\n> >               p4 sync ...@GIT_TAG_ON_DELETED &&\n> > -             test -f main/deleted_file &&\n> > +             test_path_is_file main/deleted_file &&\n> >               p4 sync ...@GIT_TAG_AFTER_DELETION &&\n> > -             ! test -f main/deleted_file &&\n> > +             test_path_is_missing main/deleted_file &&\n>\n> Same here.\n>\n> Other than that the patch looks good to me, thanks!\n\nThanks for the detailed feedback, Patrick!\n\nBest,\nMarcelo\n\n>\n> Patrick\n"},{"id":"547334","messageId":"ak0ShAvpvnGh1569@pks.im","threadId":"65914","inReplyTo":"CAO=vGZpMe3dxyzFVwR7BWBxaAZ-z9Kw3CqQ0kAe5ZZGSQszkzw@mail.gmail.com","subject":"Re: [PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*'","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-07T14:51:48Z","receivedAt":"2026-07-07T14:51:55Z","isPatch":true,"body":"On Mon, Jul 06, 2026 at 12:00:00PM -0300, Marcelo Machado Lage wrote:\n> Em sex., 3 de jul. de 2026 às 05:20, Patrick Steinhardt <ps@pks.im> escreveu:\n> > On Thu, Jul 02, 2026 at 11:07:04AM -0300, Marcelo Machado Lage wrote:\n> > > diff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\n> > > index 7614dfbd95..93d6b4c479 100755\n> > > --- a/t/t9811-git-p4-label-import.sh\n> > > +++ b/t/t9811-git-p4-label-import.sh\n> > > @@ -62,9 +62,9 @@ test_expect_success 'basic p4 labels' '\n> > >\n> > >               cd main &&\n> > >               git checkout TAG_F1_ONLY &&\n> > > -             ! test -f f2 &&\n> > > +             test_path_is_missing f2 &&\n> > >               git checkout TAG_WITH\\$_SHELL_CHAR &&\n> > > -             test -f f1 && test -f f2 && test -f file_with_\\$metachar &&\n> > > +             test_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\\$metachar &&\n> >\n> > While at it we could split this line into three lines -- it's getting\n> > overly long, and we typically don't chain multiple commands on one line\n> > nowadays.\n> \n> We'll do this for v2 as well and make it into a patch series to\n> separate test interface modernization from formatting changes.\n> \n> While on this, there are some other places in the file where multiple\n> commands in a && chain appear in a single line, e.g. in line 244:\n> > p4 edit f2 && date >f2 && p4 submit -d \"change\" f2 &&\n> Should we split these into multiple lines as well, even though they\n> are under the 80 characters limit?\n\nSure, if you want to convert this into a patch series anyway then I\nthink it makes sense to adapt all such locations in this test suite.\n\nPatrick\n"},{"id":"547840","messageId":"20260711160447.99708-1-marcelomlage@usp.br","threadId":"65914","inReplyTo":"20260702140704.65805-1-marcelomlage@usp.br","subject":"[PATCH v2 0/2] t9811: reformat and modernize tests","fromName":"Marcelo Machado Lage","fromEmail":"marcelomlage@usp.br","sentAt":"2026-07-11T16:04:45Z","receivedAt":"2026-07-11T16:05:15Z","isPatch":true,"body":"This patch series reformats and modernizes the t9811 tests.\nChanges since v1:\n- Break long && chains into multiple lines according to how git tests are\n  written nowadays. This was suggested by Patrick Steinhardt.\n- Replace 'test -f' calls by more useful 'test_path_*' helpers as the\n  second commit in the series.\n\nMarcelo Machado Lage (2):\n  t9811: break long && chains into multiple lines\n  t9811: replace 'test -f' and '! test -f' with 'test_path_*'\n\n t/t9811-git-p4-label-import.sh | 34 ++++++++++++++++++++++------------\n 1 file changed, 22 insertions(+), 12 deletions(-)\n\nRange-diff against v1:\n-:  ---------- > 1:  0f03c913eb t9811: break long && chains into multiple lines\n1:  f319f2e6e7 ! 2:  3e590881c3 t9811: replace 'test -f' and '! test -f' with 'test_path_*'\n    @@ Commit message\n     \n         Replace the basic shell commands 'test -f', with more modern test\n         helpers 'test_path_is_file' and 'test_path_is_missing'.\n    +    These modern helpers emit useful information when the corresponding\n    +    tests fail, unlike 'test -f' and '! test -f'.\n    +\n    +    The occurrences of '! test -f filename' were replaced by\n    +    'file_path_is_missing filename', a stronger guarantee equivalent to\n    +    '! test -e filename'.\n    +\n    +    Co-authored-by: Vinicius Lira de Freitas <vinilira@usp.br>\n    +    Signed-off-by: Vinicius Lira de Freitas <vinilira@usp.br>\n    +    Signed-off-by: Marcelo Machado Lage <marcelomlage@usp.br>\n     \n      ## t/t9811-git-p4-label-import.sh ##\n     @@ t/t9811-git-p4-label-import.sh: test_expect_success 'basic p4 labels' '\n    @@ t/t9811-git-p4-label-import.sh: test_expect_success 'basic p4 labels' '\n     -\t\t! test -f f2 &&\n     +\t\ttest_path_is_missing f2 &&\n      \t\tgit checkout TAG_WITH\\$_SHELL_CHAR &&\n    --\t\ttest -f f1 && test -f f2 && test -f file_with_\\$metachar &&\n    -+\t\ttest_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\\$metachar &&\n    +-\t\ttest -f f1 &&\n    +-\t\ttest -f f2 &&\n    +-\t\ttest -f file_with_\\$metachar &&\n    ++\t\ttest_path_is_file f1 &&\n    ++\t\ttest_path_is_file f2 &&\n    ++\t\ttest_path_is_file file_with_\\$metachar &&\n      \n      \t\tgit show TAG_LONG_LABEL | grep -q \"A Label second line\"\n      \t)\n-- \n2.34.1\n\n"},{"id":"547841","messageId":"20260711160447.99708-2-marcelomlage@usp.br","threadId":"65914","inReplyTo":"20260711160447.99708-1-marcelomlage@usp.br","subject":"[PATCH v2 1/2] t9811: break long && chains into multiple lines","fromName":"Marcelo Machado Lage","fromEmail":"marcelomlage@usp.br","sentAt":"2026-07-11T16:04:46Z","receivedAt":"2026-07-11T16:05:20Z","isPatch":true,"body":"Rewrite single-line && chains by breaking them into multiple lines.\n\nCo-authored-by: Vinicius Lira de Freitas <vinilira@usp.br>\nSigned-off-by: Vinicius Lira de Freitas <vinilira@usp.br>\nSigned-off-by: Marcelo Machado Lage <marcelomlage@usp.br>\n---\n t/t9811-git-p4-label-import.sh | 20 +++++++++++++++-----\n 1 file changed, 15 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex 7614dfbd95..072bc88210 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -64,7 +64,9 @@ test_expect_success 'basic p4 labels' '\n \t\tgit checkout TAG_F1_ONLY &&\n \t\t! test -f f2 &&\n \t\tgit checkout TAG_WITH\\$_SHELL_CHAR &&\n-\t\ttest -f f1 && test -f f2 && test -f file_with_\\$metachar &&\n+\t\ttest -f f1 &&\n+\t\ttest -f f2 &&\n+\t\ttest -f file_with_\\$metachar &&\n \n \t\tgit show TAG_LONG_LABEL | grep -q \"A Label second line\"\n \t)\n@@ -231,17 +233,25 @@ test_expect_success 'importing labels with missing revisions' '\n \t\tP4CLIENT=missing-revision &&\n \t\tclient_view \"//depot/missing-revision/... //missing-revision/...\" &&\n \t\tcd \"$cli\" &&\n-\t\t>f1 && p4 add f1 && p4 submit -d \"start\" &&\n+\t\t>f1 && \n+\t\tp4 add f1 &&\n+\t\tp4 submit -d \"start\" &&\n \n \t\tp4 tag -l TAG_S0 ... &&\n \n-\t\t>f2 && p4 add f2 && p4 submit -d \"second\" &&\n+\t\t>f2 &&\n+\t\tp4 add f2 &&\n+\t\tp4 submit -d \"second\" &&\n \n \t\tstartrev=$(p4_head_revision //depot/missing-revision/...) &&\n \n-\t\t>f3 && p4 add f3 && p4 submit -d \"third\" &&\n+\t\t>f3 &&\n+\t\tp4 add f3 &&\n+\t\tp4 submit -d \"third\" &&\n \n-\t\tp4 edit f2 && date >f2 && p4 submit -d \"change\" f2 &&\n+\t\tp4 edit f2 &&\n+\t\tdate >f2 &&\n+\t\tp4 submit -d \"change\" f2 &&\n \n \t\tendrev=$(p4_head_revision //depot/missing-revision/...) &&\n \n-- \n2.34.1\n\n"},{"id":"547842","messageId":"20260711160447.99708-3-marcelomlage@usp.br","threadId":"65914","inReplyTo":"20260711160447.99708-1-marcelomlage@usp.br","subject":"[PATCH v2 2/2] t9811: replace 'test -f' and '! test -f' with 'test_path_*'","fromName":"Marcelo Machado Lage","fromEmail":"marcelomlage@usp.br","sentAt":"2026-07-11T16:04:47Z","receivedAt":"2026-07-11T16:05:24Z","isPatch":true,"body":"Replace the basic shell commands 'test -f', with more modern test\nhelpers 'test_path_is_file' and 'test_path_is_missing'.\nThese modern helpers emit useful information when the corresponding\ntests fail, unlike 'test -f' and '! test -f'.\n\nThe occurrences of '! test -f filename' were replaced by\n'file_path_is_missing filename', a stronger guarantee equivalent to\n'! test -e filename'.\n\nCo-authored-by: Vinicius Lira de Freitas <vinilira@usp.br>\nSigned-off-by: Vinicius Lira de Freitas <vinilira@usp.br>\nSigned-off-by: Marcelo Machado Lage <marcelomlage@usp.br>\n---\n t/t9811-git-p4-label-import.sh | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex 072bc88210..866d7b597b 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -62,11 +62,11 @@ test_expect_success 'basic p4 labels' '\n \n \t\tcd main &&\n \t\tgit checkout TAG_F1_ONLY &&\n-\t\t! test -f f2 &&\n+\t\ttest_path_is_missing f2 &&\n \t\tgit checkout TAG_WITH\\$_SHELL_CHAR &&\n-\t\ttest -f f1 &&\n-\t\ttest -f f2 &&\n-\t\ttest -f file_with_\\$metachar &&\n+\t\ttest_path_is_file f1 &&\n+\t\ttest_path_is_file f2 &&\n+\t\ttest_path_is_file file_with_\\$metachar &&\n \n \t\tgit show TAG_LONG_LABEL | grep -q \"A Label second line\"\n \t)\n@@ -104,11 +104,11 @@ test_expect_success 'two labels on the same changelist' '\n \n \t\tgit checkout TAG_F1_1 &&\n \t\tls &&\n-\t\ttest -f f1 &&\n+\t\ttest_path_is_file f1 &&\n \n \t\tgit checkout TAG_F1_2 &&\n \t\tls &&\n-\t\ttest -f f1\n+\t\ttest_path_is_file f1\n \t)\n '\n \n@@ -137,9 +137,9 @@ test_expect_success 'export git tags to p4' '\n \t\tp4 labels ... | grep LIGHTWEIGHT_TAG &&\n \t\tp4 label -o GIT_TAG_1 | grep \"tag created in git:xyzzy\" &&\n \t\tp4 sync ...@GIT_TAG_1 &&\n-\t\t! test -f main/f10 &&\n+\t\ttest_path_is_missing main/f10 &&\n \t\tp4 sync ...@GIT_TAG_2 &&\n-\t\ttest -f main/f10\n+\t\ttest_path_is_file main/f10\n \t)\n '\n \n@@ -170,9 +170,9 @@ test_expect_success 'export git tags to p4 with deletion' '\n \t\tcd \"$cli\" &&\n \t\tp4 sync ... &&\n \t\tp4 sync ...@GIT_TAG_ON_DELETED &&\n-\t\ttest -f main/deleted_file &&\n+\t\ttest_path_is_file main/deleted_file &&\n \t\tp4 sync ...@GIT_TAG_AFTER_DELETION &&\n-\t\t! test -f main/deleted_file &&\n+\t\ttest_path_is_missing main/deleted_file &&\n \t\techo \"checking label contents\" &&\n \t\tp4 label -o GIT_TAG_ON_DELETED | grep \"tag on deleted file\"\n \t)\n-- \n2.34.1\n\n"},{"id":"547974","messageId":"alTHrUEh4_O5ROeu@pks.im","threadId":"65914","inReplyTo":"20260711160447.99708-1-marcelomlage@usp.br","subject":"Re: [PATCH v2 0/2] t9811: reformat and modernize tests","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-13T11:10:37Z","receivedAt":"2026-07-13T11:10:43Z","isPatch":true,"body":"On Sat, Jul 11, 2026 at 01:04:45PM -0300, Marcelo Machado Lage wrote:\n> This patch series reformats and modernizes the t9811 tests.\n> Changes since v1:\n> - Break long && chains into multiple lines according to how git tests are\n>   written nowadays. This was suggested by Patrick Steinhardt.\n> - Replace 'test -f' calls by more useful 'test_path_*' helpers as the\n>   second commit in the series.\n\nThanks, I'm happy with this version!\n\nPatrick\n"}]}