{"thread":{"id":"61828","subject":"[PATCH 0/3] Improvements for Perforce tests","startedAt":"2024-07-23T14:05:38Z","lastAt":"2024-07-31T22:32:32Z","messageCount":19,"participants":["Patrick Steinhardt","Johannes Schindelin","Junio C Hamano","Justin Tobler"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"499158","messageId":"cover.1721740612.git.ps@pks.im","threadId":"61828","inReplyTo":null,"subject":"[PATCH 0/3] Improvements for Perforce tests","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-23T14:05:33Z","receivedAt":"2024-07-23T14:05:38Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nI was recently trying to figure out whether the Perforce tests are\nmemory-leak free, but noticed that the tests don't run at all on my\nmachine because I have a newer version of Perforce than our CI. And\nbecause the on-disk depot format has changed since r21, tests are\nbroken.\n\nThis small series adapts tests to work with both r21 and r23, updates\nthe version of Perforce used in CI and then ultimately marks all of the\nPerforce tests as memory-leak free.\n\nThanks!\n\nPatrick\n\nPatrick Steinhardt (3):\n  t98xx: fix Perforce tests with p4d r23 and newer\n  ci: update Perforce version to r23.2\n  t98xx: mark Perforce tests as memory-leak free\n\n ci/install-dependencies.sh                  |  2 +-\n t/t9800-git-p4-basic.sh                     | 14 ++++++++++++--\n t/t9801-git-p4-branch.sh                    |  1 +\n t/t9802-git-p4-filetype.sh                  | 16 +++++++++++++---\n t/t9803-git-p4-shell-metachars.sh           |  1 +\n t/t9804-git-p4-label.sh                     |  1 +\n t/t9805-git-p4-skip-submit-edit.sh          |  1 +\n t/t9806-git-p4-options.sh                   |  1 +\n t/t9808-git-p4-chdir.sh                     |  1 +\n t/t9809-git-p4-client-view.sh               |  1 +\n t/t9810-git-p4-rcs.sh                       |  1 +\n t/t9811-git-p4-label-import.sh              |  1 +\n t/t9812-git-p4-wildcards.sh                 |  1 +\n t/t9813-git-p4-preserve-users.sh            |  1 +\n t/t9814-git-p4-rename.sh                    |  1 +\n t/t9815-git-p4-submit-fail.sh               |  1 +\n t/t9816-git-p4-locked.sh                    |  1 +\n t/t9817-git-p4-exclude.sh                   |  1 +\n t/t9818-git-p4-block.sh                     |  1 +\n t/t9819-git-p4-case-folding.sh              |  1 +\n t/t9820-git-p4-editor-handling.sh           |  1 +\n t/t9821-git-p4-path-variations.sh           |  1 +\n t/t9822-git-p4-path-encoding.sh             |  1 +\n t/t9823-git-p4-mock-lfs.sh                  |  1 +\n t/t9825-git-p4-handle-utf16-without-bom.sh  | 19 ++++++++++++++++---\n t/t9826-git-p4-keep-empty-commits.sh        |  1 +\n t/t9827-git-p4-change-filetype.sh           |  1 +\n t/t9828-git-p4-map-user.sh                  |  1 +\n t/t9829-git-p4-jobs.sh                      |  1 +\n t/t9830-git-p4-symlink-dir.sh               |  1 +\n t/t9831-git-p4-triggers.sh                  |  1 +\n t/t9832-unshelve.sh                         |  1 +\n t/t9833-errors.sh                           |  1 +\n t/t9834-git-p4-file-dir-bug.sh              |  1 +\n t/t9835-git-p4-metadata-encoding-python2.sh |  1 +\n t/t9836-git-p4-metadata-encoding-python3.sh |  1 +\n 36 files changed, 74 insertions(+), 9 deletions(-)\n\n-- \n2.46.0.rc1.dirty\n\n"},{"id":"499159","messageId":"f40f62f257de38c3a38e942eb9ca1d2109c2b059.1721740612.git.ps@pks.im","threadId":"61828","inReplyTo":"cover.1721740612.git.ps@pks.im","subject":"[PATCH 1/3] t98xx: fix Perforce tests with p4d r23 and newer","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-23T14:05:37Z","receivedAt":"2024-07-23T14:05:49Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Some of the tests in t98xx modify the Perforce depot in ways that the\ntool wouldn't normally allow. This is done to test behaviour of git-p4\nin certain edge cases that we have observed in the wild, but which\nshould in theory not be possible.\n\nNaturally, modifying the depot on disk directly is quite intimate with\nthe tool and thus prone to breakage when Perforce updates the way that\ndata is stored. And indeed, those tests are broken nowadays with r23 of\nPerforce. While a file revision was previously stored as plain file\n\"depot/file,v\", it is now stored in a directory \"depot/file,d\" with\ncompression.\n\nAdapt those tests to handle both old- and new-style depot layouts.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t9800-git-p4-basic.sh                    | 13 +++++++++++--\n t/t9802-git-p4-filetype.sh                 | 15 ++++++++++++---\n t/t9825-git-p4-handle-utf16-without-bom.sh | 18 +++++++++++++++---\n 3 files changed, 38 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex 53af8e34ac..4e95622670 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -297,8 +297,17 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '\n # p4 changes, files, or describe; just in p4 print.  If P4CLIENT is unset, the\n # message will include \"Librarian checkout\".\n test_expect_success 'exit gracefully for p4 server errors' '\n-\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n-\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden &&\n+\tcase \"$(echo \"$db\"/depot/file1*)\" in\n+\t*,v)\n+\t\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n+\t\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden;;\n+\t*,d)\n+\t\tpath=\"$(echo \"$db\"/depot/file1,d/*.gz)\" &&\n+\t\ttest_when_finished \"mv \\\"$path\\\",hidden \\\"$path\\\"\" &&\n+\t\tmv \"$path\" \"$path\",hidden;;\n+\t*)\n+\t\tBUG \"unhandled p4d layout\";;\n+\tesac &&\n \ttest_when_finished cleanup_git &&\n \ttest_expect_code 1 git p4 clone --dest=\"$git\" //depot@1 >out 2>err &&\n \ttest_grep \"Error from p4 print\" err\ndiff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh\nindex bb236cd2b5..557e11b16c 100755\n--- a/t/t9802-git-p4-filetype.sh\n+++ b/t/t9802-git-p4-filetype.sh\n@@ -301,9 +301,18 @@ test_expect_success SYMLINKS 'empty symlink target' '\n \t\t#     @@\n \t\t#\n \t\tcd \"$db/depot\" &&\n-\t\tsed \"/@target1/{; s/target1/@/; n; d; }\" \\\n-\t\t    empty-symlink,v >empty-symlink,v.tmp &&\n-\t\tmv empty-symlink,v.tmp empty-symlink,v\n+\t\tcase \"$(echo empty-symlink*)\" in\n+\t\tempty-symlink,v)\n+\t\t\tsed \"/@target1/{; s/target1/@/; n; d; }\" \\\n+\t\t\t    empty-symlink,v >empty-symlink,v.tmp &&\n+\t\t\tmv empty-symlink,v.tmp empty-symlink,v;;\n+\t\tempty-symlink,d)\n+\t\t\tpath=\"empty-symlink,d/$(ls empty-symlink,d/ | tail -n1)\" &&\n+\t\t\trm \"$path\" &&\n+\t\t\tgzip </dev/null >\"$path\";;\n+\t\t*)\n+\t\t\tBUG \"unhandled p4d layout\";;\n+\t\tesac\n \t) &&\n \t(\n \t\t# Make sure symlink really is empty.  Asking\ndiff --git a/t/t9825-git-p4-handle-utf16-without-bom.sh b/t/t9825-git-p4-handle-utf16-without-bom.sh\nindex f049ff8229..8e34f72198 100755\n--- a/t/t9825-git-p4-handle-utf16-without-bom.sh\n+++ b/t/t9825-git-p4-handle-utf16-without-bom.sh\n@@ -22,9 +22,21 @@ test_expect_success 'init depot with UTF-16 encoded file and artificially remove\n \t\tcd db &&\n \t\tp4d -jc &&\n \t\t# P4D automatically adds a BOM. Remove it here to make the file invalid.\n-\t\tsed -e \"\\$d\" depot/file1,v >depot/file1,v.new &&\n-\t\tmv depot/file1,v.new depot/file1,v &&\n-\t\tprintf \"@$UTF16@\" >>depot/file1,v &&\n+\t\tcase \"$(echo depot/file1*)\" in\n+\t\tdepot/file1,v)\n+\t\t\tsed -e \"\\$d\" depot/file1,v >depot/file1,v.new &&\n+\t\t\tmv depot/file1,v.new depot/file1,v &&\n+\t\t\tprintf \"@$UTF16@\" >>depot/file1,v;;\n+\t\tdepot/file1,d)\n+\t\t\tpath=\"$(echo depot/file1,d/*.gz)\" &&\n+\t\t\tgunzip -c \"$path\" >\"$path.unzipped\" &&\n+\t\t\tsed -e \"\\$d\" \"$path.unzipped\" >\"$path.new\" &&\n+\t\t\tprintf \"$UTF16\" >>\"$path.new\" &&\n+\t\t\tgzip -c \"$path.new\" >\"$path\" &&\n+\t\t\trm \"$path.unzipped\" \"$path.new\";;\n+\t\t*)\n+\t\t\tBUG \"unhandled p4d layout\";;\n+\t\tesac &&\n \t\tp4d -jrF checkpoint.1\n \t)\n '\n-- \n2.46.0.rc1.dirty\n\n"},{"id":"499160","messageId":"ee5d836b779087890acdad061ef6995642942479.1721740612.git.ps@pks.im","threadId":"61828","inReplyTo":"cover.1721740612.git.ps@pks.im","subject":"[PATCH 2/3] ci: update Perforce version to r23.2","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-23T14:05:42Z","receivedAt":"2024-07-23T14:05:50Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Update our Perforce version from r21.2 to r23.2. Note that the updated\nversion is not the newest version. Instead, it is the last version where\nthe way that Perforce is being distributed remains the same as in r21.2.\nNewer releases stopped distributing p4 and p4d executablesas well as the\nmacOS archives directly and would thus require more work.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n ci/install-dependencies.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh\nindex 6ec0f85972..b59fd7c1fd 100755\n--- a/ci/install-dependencies.sh\n+++ b/ci/install-dependencies.sh\n@@ -7,7 +7,7 @@\n \n begin_group \"Install dependencies\"\n \n-P4WHENCE=https://cdist2.perforce.com/perforce/r21.2\n+P4WHENCE=https://cdist2.perforce.com/perforce/r23.2\n LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION\n JGITWHENCE=https://repo.eclipse.org/content/groups/releases//org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh\n \n-- \n2.46.0.rc1.dirty\n\n"},{"id":"499161","messageId":"d0a80ba403a59d2d3f05b8336f229ff27caaa9d3.1721740612.git.ps@pks.im","threadId":"61828","inReplyTo":"cover.1721740612.git.ps@pks.im","subject":"[PATCH 3/3] t98xx: mark Perforce tests as memory-leak free","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-23T14:05:46Z","receivedAt":"2024-07-23T14:05:52Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"All the Perforce tests are free of memory leaks. This went unnoticed\nbecause most folks do not have p4 and p4d installed on their computers.\nConsequently, given that the prerequisites for running those tests\naren't fulfilled, `TEST_PASSES_SANITIZE_LEAK=check` won't notice that\nthose tests are indeed memory leak free.\n\nMark those tests accordingly.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t9800-git-p4-basic.sh                     | 1 +\n t/t9801-git-p4-branch.sh                    | 1 +\n t/t9802-git-p4-filetype.sh                  | 1 +\n t/t9803-git-p4-shell-metachars.sh           | 1 +\n t/t9804-git-p4-label.sh                     | 1 +\n t/t9805-git-p4-skip-submit-edit.sh          | 1 +\n t/t9806-git-p4-options.sh                   | 1 +\n t/t9808-git-p4-chdir.sh                     | 1 +\n t/t9809-git-p4-client-view.sh               | 1 +\n t/t9810-git-p4-rcs.sh                       | 1 +\n t/t9811-git-p4-label-import.sh              | 1 +\n t/t9812-git-p4-wildcards.sh                 | 1 +\n t/t9813-git-p4-preserve-users.sh            | 1 +\n t/t9814-git-p4-rename.sh                    | 1 +\n t/t9815-git-p4-submit-fail.sh               | 1 +\n t/t9816-git-p4-locked.sh                    | 1 +\n t/t9817-git-p4-exclude.sh                   | 1 +\n t/t9818-git-p4-block.sh                     | 1 +\n t/t9819-git-p4-case-folding.sh              | 1 +\n t/t9820-git-p4-editor-handling.sh           | 1 +\n t/t9821-git-p4-path-variations.sh           | 1 +\n t/t9822-git-p4-path-encoding.sh             | 1 +\n t/t9823-git-p4-mock-lfs.sh                  | 1 +\n t/t9825-git-p4-handle-utf16-without-bom.sh  | 1 +\n t/t9826-git-p4-keep-empty-commits.sh        | 1 +\n t/t9827-git-p4-change-filetype.sh           | 1 +\n t/t9828-git-p4-map-user.sh                  | 1 +\n t/t9829-git-p4-jobs.sh                      | 1 +\n t/t9830-git-p4-symlink-dir.sh               | 1 +\n t/t9831-git-p4-triggers.sh                  | 1 +\n t/t9832-unshelve.sh                         | 1 +\n t/t9833-errors.sh                           | 1 +\n t/t9834-git-p4-file-dir-bug.sh              | 1 +\n t/t9835-git-p4-metadata-encoding-python2.sh | 1 +\n t/t9836-git-p4-metadata-encoding-python3.sh | 1 +\n 35 files changed, 35 insertions(+)\n\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex 4e95622670..00b5bdd727 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -5,6 +5,7 @@ test_description='git p4 tests'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex c598011635..cdbfacc727 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -5,6 +5,7 @@ test_description='git p4 tests for p4 branches'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh\nindex 557e11b16c..4f8cb4a768 100755\n--- a/t/t9802-git-p4-filetype.sh\n+++ b/t/t9802-git-p4-filetype.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 filetype tests'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh\nindex 2913277013..ab7fe16266 100755\n--- a/t/t9803-git-p4-shell-metachars.sh\n+++ b/t/t9803-git-p4-shell-metachars.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 transparency to shell metachars in filenames'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9804-git-p4-label.sh b/t/t9804-git-p4-label.sh\nindex 3236457106..c8963fd398 100755\n--- a/t/t9804-git-p4-label.sh\n+++ b/t/t9804-git-p4-label.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 label tests'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9805-git-p4-skip-submit-edit.sh b/t/t9805-git-p4-skip-submit-edit.sh\nindex 90ef647db7..72dce3d2b4 100755\n--- a/t/t9805-git-p4-skip-submit-edit.sh\n+++ b/t/t9805-git-p4-skip-submit-edit.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 skipSubmitEdit config variables'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh\nindex c26d297433..e4ce44ebf3 100755\n--- a/t/t9806-git-p4-options.sh\n+++ b/t/t9806-git-p4-options.sh\n@@ -5,6 +5,7 @@ test_description='git p4 options'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9808-git-p4-chdir.sh b/t/t9808-git-p4-chdir.sh\nindex 58a9b3b71e..342f7f3d4a 100755\n--- a/t/t9808-git-p4-chdir.sh\n+++ b/t/t9808-git-p4-chdir.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 relative chdir'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh\nindex 9c9710d8c7..f33fdea889 100755\n--- a/t/t9809-git-p4-client-view.sh\n+++ b/t/t9809-git-p4-client-view.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 client view'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9810-git-p4-rcs.sh b/t/t9810-git-p4-rcs.sh\nindex 5fe83315ec..15e32c9f35 100755\n--- a/t/t9810-git-p4-rcs.sh\n+++ b/t/t9810-git-p4-rcs.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 rcs keywords'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n CP1252=\"\\223\\224\"\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex 5ac5383fb7..52a4b0af81 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -5,6 +5,7 @@ test_description='git p4 label tests'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9812-git-p4-wildcards.sh b/t/t9812-git-p4-wildcards.sh\nindex 254a7c2446..46aa5fd56c 100755\n--- a/t/t9812-git-p4-wildcards.sh\n+++ b/t/t9812-git-p4-wildcards.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 wildcards'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9813-git-p4-preserve-users.sh b/t/t9813-git-p4-preserve-users.sh\nindex fd018c87a8..0efea28da2 100755\n--- a/t/t9813-git-p4-preserve-users.sh\n+++ b/t/t9813-git-p4-preserve-users.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 preserve users'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh\nindex 2a9838f37f..00df6ebd3b 100755\n--- a/t/t9814-git-p4-rename.sh\n+++ b/t/t9814-git-p4-rename.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 rename'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh\nindex c766fd159f..92ef9d8c24 100755\n--- a/t/t9815-git-p4-submit-fail.sh\n+++ b/t/t9815-git-p4-submit-fail.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 submit failure handling'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9816-git-p4-locked.sh b/t/t9816-git-p4-locked.sh\nindex 5e904ac80d..e687fbc25f 100755\n--- a/t/t9816-git-p4-locked.sh\n+++ b/t/t9816-git-p4-locked.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 locked file behavior'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9817-git-p4-exclude.sh b/t/t9817-git-p4-exclude.sh\nindex ec3d937c6a..3deb334fed 100755\n--- a/t/t9817-git-p4-exclude.sh\n+++ b/t/t9817-git-p4-exclude.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 tests for excluded paths during clone and sync'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9818-git-p4-block.sh b/t/t9818-git-p4-block.sh\nindex de591d875c..091bb72bdb 100755\n--- a/t/t9818-git-p4-block.sh\n+++ b/t/t9818-git-p4-block.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 fetching changes in multiple blocks'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9819-git-p4-case-folding.sh b/t/t9819-git-p4-case-folding.sh\nindex b4d93f0c17..985be20357 100755\n--- a/t/t9819-git-p4-case-folding.sh\n+++ b/t/t9819-git-p4-case-folding.sh\n@@ -2,6 +2,7 @@\n \n test_description='interaction with P4 case-folding'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n if test_have_prereq CASE_INSENSITIVE_FS\ndiff --git a/t/t9820-git-p4-editor-handling.sh b/t/t9820-git-p4-editor-handling.sh\nindex fa1bba1dd9..48e4dfb95c 100755\n--- a/t/t9820-git-p4-editor-handling.sh\n+++ b/t/t9820-git-p4-editor-handling.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 handling of EDITOR'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh\nindex ef80f1690b..49691c53da 100755\n--- a/t/t9821-git-p4-path-variations.sh\n+++ b/t/t9821-git-p4-path-variations.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories with path case variations'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d with case folding enabled' '\ndiff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh\nindex 572d395498..e62ed49f51 100755\n--- a/t/t9822-git-p4-path-encoding.sh\n+++ b/t/t9822-git-p4-path-encoding.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories with non ASCII paths'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n UTF8_ESCAPED=\"a-\\303\\244_o-\\303\\266_u-\\303\\274.txt\"\ndiff --git a/t/t9823-git-p4-mock-lfs.sh b/t/t9823-git-p4-mock-lfs.sh\nindex 88b76dc4d6..98a40d8af3 100755\n--- a/t/t9823-git-p4-mock-lfs.sh\n+++ b/t/t9823-git-p4-mock-lfs.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories and store files in Mock LFS'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_file_is_not_in_mock_lfs () {\ndiff --git a/t/t9825-git-p4-handle-utf16-without-bom.sh b/t/t9825-git-p4-handle-utf16-without-bom.sh\nindex 8e34f72198..4d1d4fa5f3 100755\n--- a/t/t9825-git-p4-handle-utf16-without-bom.sh\n+++ b/t/t9825-git-p4-handle-utf16-without-bom.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 handling of UTF-16 files without BOM'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n UTF16=\"\\227\\000\\227\\000\"\ndiff --git a/t/t9826-git-p4-keep-empty-commits.sh b/t/t9826-git-p4-keep-empty-commits.sh\nindex fd64afe064..54083f842e 100755\n--- a/t/t9826-git-p4-keep-empty-commits.sh\n+++ b/t/t9826-git-p4-keep-empty-commits.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories and keep empty commits'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9827-git-p4-change-filetype.sh b/t/t9827-git-p4-change-filetype.sh\nindex d3670bd7a2..3476ea2fd3 100755\n--- a/t/t9827-git-p4-change-filetype.sh\n+++ b/t/t9827-git-p4-change-filetype.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 support for file type change'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9828-git-p4-map-user.sh b/t/t9828-git-p4-map-user.sh\nindex ca6c2942bd..7c8f9e3930 100755\n--- a/t/t9828-git-p4-map-user.sh\n+++ b/t/t9828-git-p4-map-user.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories and map users'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9829-git-p4-jobs.sh b/t/t9829-git-p4-jobs.sh\nindex 88cfb1fcd3..3fc0948d9c 100755\n--- a/t/t9829-git-p4-jobs.sh\n+++ b/t/t9829-git-p4-jobs.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 retrieve job info'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9830-git-p4-symlink-dir.sh b/t/t9830-git-p4-symlink-dir.sh\nindex 3fb6960c18..02561a7f0e 100755\n--- a/t/t9830-git-p4-symlink-dir.sh\n+++ b/t/t9830-git-p4-symlink-dir.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 symlinked directories'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9831-git-p4-triggers.sh b/t/t9831-git-p4-triggers.sh\nindex ff6c0352e6..f287f41e37 100755\n--- a/t/t9831-git-p4-triggers.sh\n+++ b/t/t9831-git-p4-triggers.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 with server triggers'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9832-unshelve.sh b/t/t9832-unshelve.sh\nindex 6b3cb0414a..a266775408 100755\n--- a/t/t9832-unshelve.sh\n+++ b/t/t9832-unshelve.sh\n@@ -6,6 +6,7 @@ last_shelved_change () {\n \n test_description='git p4 unshelve'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9833-errors.sh b/t/t9833-errors.sh\nindex e22369ccdf..da1d30c142 100755\n--- a/t/t9833-errors.sh\n+++ b/t/t9833-errors.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 errors'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9834-git-p4-file-dir-bug.sh b/t/t9834-git-p4-file-dir-bug.sh\nindex dac67e89d7..565870fc74 100755\n--- a/t/t9834-git-p4-file-dir-bug.sh\n+++ b/t/t9834-git-p4-file-dir-bug.sh\n@@ -6,6 +6,7 @@ This test creates files and directories with the same name in perforce and\n checks that git-p4 recovers from the error at the same time as the perforce\n repository.'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9835-git-p4-metadata-encoding-python2.sh b/t/t9835-git-p4-metadata-encoding-python2.sh\nindex 036bf79c66..ad20ffdede 100755\n--- a/t/t9835-git-p4-metadata-encoding-python2.sh\n+++ b/t/t9835-git-p4-metadata-encoding-python2.sh\n@@ -6,6 +6,7 @@ This test checks that the import process handles inconsistent text\n encoding in p4 metadata (author names, commit messages, etc) without\n failing, and produces maximally sane output in git.'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n python_target_version='2'\ndiff --git a/t/t9836-git-p4-metadata-encoding-python3.sh b/t/t9836-git-p4-metadata-encoding-python3.sh\nindex 63350dc4b5..71ae763399 100755\n--- a/t/t9836-git-p4-metadata-encoding-python3.sh\n+++ b/t/t9836-git-p4-metadata-encoding-python3.sh\n@@ -6,6 +6,7 @@ This test checks that the import process handles inconsistent text\n encoding in p4 metadata (author names, commit messages, etc) without\n failing, and produces maximally sane output in git.'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n python_target_version='3'\n-- \n2.46.0.rc1.dirty\n\n"},{"id":"499236","messageId":"da9c4d1e-0fce-3bf3-c35b-32704a8a2129@gmx.de","threadId":"61828","inReplyTo":"ee5d836b779087890acdad061ef6995642942479.1721740612.git.ps@pks.im","subject":"Re: [PATCH 2/3] ci: update Perforce version to r23.2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2024-07-24T08:39:54Z","receivedAt":"2024-07-24T08:39:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Patrick,\n\nOn Tue, 23 Jul 2024, Patrick Steinhardt wrote:\n\n> Update our Perforce version from r21.2 to r23.2. Note that the updated\n> version is not the newest version. Instead, it is the last version where\n> the way that Perforce is being distributed remains the same as in r21.2.\n> Newer releases stopped distributing p4 and p4d executablesas well as the\n> macOS archives directly and would thus require more work.\n\nAn alternative would be to simply stop installing `p4` in CI. I would\nactually be in favor of that, for multiple reasons:\n\n- The pace of reviews and integration of `git-p4` patches has slowed down\n  over the couple of years. For example,\n  https://lore.kernel.org/git/20210510183638.156a6b1d@ado-tr/ has not seen\n  any traction in over three years (most likely because we no longer have\n  any active contributor with a vested interest in `git-p4`), and\n  https://github.com/gitgitgadget/git/pull/1028 and\n  https://github.com/gitgitgadget/git/pull/1070 have not even been\n  submitted to the Git mailing list (most likely because of the hurdles to\n  contribute).\n\n- Over the years, it has been made harder and harder to install Perforce\n  in CI. I spent a good deal of time trying to keep the Homebrew taps up\n  to date (which was hard because Perforce kept replacing the archive\n  behind that URL with newer versions, which always broke Homebrew's SHA\n  check until it was adjusted accordingly).\n\n- The `git-p4` tests use quite a bit of time and electricity in all those\n  CI builds. Therefore, it seems desirable to me to stop running these\n  tests as part of the CI builds.\n\nCiao,\nJohannes\n"},{"id":"499239","messageId":"ZqDC7O985AUUg3Pd@tanuki","threadId":"61828","inReplyTo":"da9c4d1e-0fce-3bf3-c35b-32704a8a2129@gmx.de","subject":"Re: [PATCH 2/3] ci: update Perforce version to r23.2","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-24T09:01:32Z","receivedAt":"2024-07-24T09:01:37Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Jul 24, 2024 at 10:39:54AM +0200, Johannes Schindelin wrote:\n> Hi Patrick,\n> \n> On Tue, 23 Jul 2024, Patrick Steinhardt wrote:\n> \n> > Update our Perforce version from r21.2 to r23.2. Note that the updated\n> > version is not the newest version. Instead, it is the last version where\n> > the way that Perforce is being distributed remains the same as in r21.2.\n> > Newer releases stopped distributing p4 and p4d executablesas well as the\n> > macOS archives directly and would thus require more work.\n> \n> An alternative would be to simply stop installing `p4` in CI. I would\n> actually be in favor of that, for multiple reasons:\n> \n> - The pace of reviews and integration of `git-p4` patches has slowed down\n>   over the couple of years. For example,\n>   https://lore.kernel.org/git/20210510183638.156a6b1d@ado-tr/ has not seen\n>   any traction in over three years (most likely because we no longer have\n>   any active contributor with a vested interest in `git-p4`), and\n>   https://github.com/gitgitgadget/git/pull/1028 and\n>   https://github.com/gitgitgadget/git/pull/1070 have not even been\n>   submitted to the Git mailing list (most likely because of the hurdles to\n>   contribute).\n> \n> - Over the years, it has been made harder and harder to install Perforce\n>   in CI. I spent a good deal of time trying to keep the Homebrew taps up\n>   to date (which was hard because Perforce kept replacing the archive\n>   behind that URL with newer versions, which always broke Homebrew's SHA\n>   check until it was adjusted accordingly).\n> \n> - The `git-p4` tests use quite a bit of time and electricity in all those\n>   CI builds. Therefore, it seems desirable to me to stop running these\n>   tests as part of the CI builds.\n\nI don't think that is a good idea. If we stop installing p4, the result\nis that _nobody_ will ever run the tests at all. The tests, and by\nextension git-p4 itself, would start to bitrot and we wouldn't notice\nany kind of regressions at all anymore.\n\nIf we want to consider going down that route, I'd rather say we should\ndo it all or nothing: either we rip out git-p4 and the tests, or we\nleave both of them in. I couldn't care less about git-p4 itself, so I\nwould not mind ripping it out altogether. But there may be users of this\nscript out there that do care, so I don't want to make that decision\nunilaterally.\n\nPatrick\n"},{"id":"499276","messageId":"xmqqmsm6ydm9.fsf@gitster.g","threadId":"61828","inReplyTo":"ZqDC7O985AUUg3Pd@tanuki","subject":"Re: [PATCH 2/3] ci: update Perforce version to r23.2","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-24T16:10:54Z","receivedAt":"2024-07-24T16:10:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> I don't think that is a good idea. If we stop installing p4, the result\n> is that _nobody_ will ever run the tests at all. The tests, and by\n> extension git-p4 itself, would start to bitrot and we wouldn't notice\n> any kind of regressions at all anymore.\n>\n> If we want to consider going down that route, I'd rather say we should\n> do it all or nothing: either we rip out git-p4 and the tests, or we\n> leave both of them in. I couldn't care less about git-p4 itself, so I\n> would not mind ripping it out altogether. But there may be users of this\n> script out there that do care, so I don't want to make that decision\n> unilaterally.\n\nYup, I was actually interpreting Dscho's message as advocating the\nremoval of \"git p4\".  Such a move would certainly force people who\ndo care about it to come out.  It is up to them to volunteer to help\nmaintaining \"git p4\".\n\nThis may be a good example to discuss \"support policy\" not on niche\nplatforms but on niche features (Emily Cc'ed).\n\nThanks.\n"},{"id":"499562","messageId":"ZqiBYK2HwLRk3Kqn@tanuki","threadId":"61828","inReplyTo":"xmqqmsm6ydm9.fsf@gitster.g","subject":"Re: [PATCH 2/3] ci: update Perforce version to r23.2","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-30T06:00:00Z","receivedAt":"2024-07-30T06:00:10Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Jul 24, 2024 at 09:10:54AM -0700, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> \n> > I don't think that is a good idea. If we stop installing p4, the result\n> > is that _nobody_ will ever run the tests at all. The tests, and by\n> > extension git-p4 itself, would start to bitrot and we wouldn't notice\n> > any kind of regressions at all anymore.\n> >\n> > If we want to consider going down that route, I'd rather say we should\n> > do it all or nothing: either we rip out git-p4 and the tests, or we\n> > leave both of them in. I couldn't care less about git-p4 itself, so I\n> > would not mind ripping it out altogether. But there may be users of this\n> > script out there that do care, so I don't want to make that decision\n> > unilaterally.\n> \n> Yup, I was actually interpreting Dscho's message as advocating the\n> removal of \"git p4\".  Such a move would certainly force people who\n> do care about it to come out.  It is up to them to volunteer to help\n> maintaining \"git p4\".\n> \n> This may be a good example to discuss \"support policy\" not on niche\n> platforms but on niche features (Emily Cc'ed).\n\nAs said, I wouldn't mind dropping support for `git p4` altogether. That\nis a much bigger discussion though, and I'm not sure whether we should\njust drop it at a \"random\" point in time without something like a grace\nperiod where people can chime in and express their wish to help out with\nthe maintenance of it. In other words, we should probably deprecate it\nproperly and announce our intent to deprecate it. Both our release notes\nand \"Documentation/BreakingChanges.txt\" could we viable ways to do that.\n\nAnd while we haven't yet decided to rip out support for Perforce, I\nthink that the proposed patch series is somewhat sensible. I honestly\nreally only care about marking the patches as leak-free to help my\nbigger goal of making the whole test suite leak-free. The other patches\nthat make the tests compatible with newer versions of Perforce aren't\nall that important, but at least they help to make those tests a bit\nmore accessible to interested folks.\n\nPatrick\n"},{"id":"499651","messageId":"aw2i5dz2tflrosz3enetxelnal6utk4g7kq7yos3jyssloysng@j2nqbxotdujg","threadId":"61828","inReplyTo":"f40f62f257de38c3a38e942eb9ca1d2109c2b059.1721740612.git.ps@pks.im","subject":"Re: [PATCH 1/3] t98xx: fix Perforce tests with p4d r23 and newer","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2024-07-30T22:41:18Z","receivedAt":"2024-07-30T22:42:04Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 24/07/23 04:05PM, Patrick Steinhardt wrote:\n> Some of the tests in t98xx modify the Perforce depot in ways that the\n> tool wouldn't normally allow. This is done to test behaviour of git-p4\n> in certain edge cases that we have observed in the wild, but which\n> should in theory not be possible.\n\nIf in theory these edge cases being tested should not be possible, that\nsounds like a bug and maybe in newer versions of p4 that is no longer\nrelevant? Does it make sense to even support these rather intimate test\ncases going forward? Maybe we could instead skip these tests for newer\nversions?\n\n> Naturally, modifying the depot on disk directly is quite intimate with\n> the tool and thus prone to breakage when Perforce updates the way that\n> data is stored. And indeed, those tests are broken nowadays with r23 of\n> Perforce. While a file revision was previously stored as plain file\n> \"depot/file,v\", it is now stored in a directory \"depot/file,d\" with\n> compression.\n\ns/plain/a plain/\n\nThis sounds like a bit of a maintenance headache, especially if there\nare not many eyes on it to begin with. I guess this ties in with other\ndiscussion from this thread about whether and of git-p4 should remain in\nthe codebase.\n\n> Adapt those tests to handle both old- and new-style depot layouts.\n> \n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  t/t9800-git-p4-basic.sh                    | 13 +++++++++++--\n>  t/t9802-git-p4-filetype.sh                 | 15 ++++++++++++---\n>  t/t9825-git-p4-handle-utf16-without-bom.sh | 18 +++++++++++++++---\n>  3 files changed, 38 insertions(+), 8 deletions(-)\n> \n> diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\n> index 53af8e34ac..4e95622670 100755\n> --- a/t/t9800-git-p4-basic.sh\n> +++ b/t/t9800-git-p4-basic.sh\n> @@ -297,8 +297,17 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '\n>  # p4 changes, files, or describe; just in p4 print.  If P4CLIENT is unset, the\n>  # message will include \"Librarian checkout\".\n>  test_expect_success 'exit gracefully for p4 server errors' '\n> -\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n> -\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden &&\n> +\tcase \"$(echo \"$db\"/depot/file1*)\" in\n> +\t*,v)\n> +\t\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n> +\t\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden;;\n> +\t*,d)\n> +\t\tpath=\"$(echo \"$db\"/depot/file1,d/*.gz)\" &&\n> +\t\ttest_when_finished \"mv \\\"$path\\\",hidden \\\"$path\\\"\" &&\n> +\t\tmv \"$path\" \"$path\",hidden;;\n> +\t*)\n> +\t\tBUG \"unhandled p4d layout\";;\n> +\tesac &&\n\nI'm not familiar with Perforce, but the test looks like it is simply\nappending \",hidden\" to the file name. I assume this to trigger some\nerror. \n\nWe are simply extending the test to also perform the same rename if,\ninstead of `depot/file1,f`, a newer version uses `depot/file1,d`.\n\nMakes sense to me, but without surrounding context its rather difficult\nto understand that the \"case\" statement here pertains to different\nPerforce versions that may be used. It might be nice to have a comment\nexplaining this.\n\n>  \ttest_when_finished cleanup_git &&\n>  \ttest_expect_code 1 git p4 clone --dest=\"$git\" //depot@1 >out 2>err &&\n>  \ttest_grep \"Error from p4 print\" err\n> diff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh\n> index bb236cd2b5..557e11b16c 100755\n> --- a/t/t9802-git-p4-filetype.sh\n> +++ b/t/t9802-git-p4-filetype.sh\n> @@ -301,9 +301,18 @@ test_expect_success SYMLINKS 'empty symlink target' '\n>  \t\t#     @@\n>  \t\t#\n>  \t\tcd \"$db/depot\" &&\n> -\t\tsed \"/@target1/{; s/target1/@/; n; d; }\" \\\n> -\t\t    empty-symlink,v >empty-symlink,v.tmp &&\n> -\t\tmv empty-symlink,v.tmp empty-symlink,v\n> +\t\tcase \"$(echo empty-symlink*)\" in\n> +\t\tempty-symlink,v)\n> +\t\t\tsed \"/@target1/{; s/target1/@/; n; d; }\" \\\n> +\t\t\t    empty-symlink,v >empty-symlink,v.tmp &&\n> +\t\t\tmv empty-symlink,v.tmp empty-symlink,v;;\n> +\t\tempty-symlink,d)\n> +\t\t\tpath=\"empty-symlink,d/$(ls empty-symlink,d/ | tail -n1)\" &&\n> +\t\t\trm \"$path\" &&\n> +\t\t\tgzip </dev/null >\"$path\";;\n> +\t\t*)\n> +\t\t\tBUG \"unhandled p4d layout\";;\n> +\t\tesac\n\nLooks like for this test, for previous Perforce versions we were making\na symlink point to nothing. For newer versions of Perforce, we seem to\naccomplish the same think by creating an empty compressed file.\n\nSeems reasonable to me.\n\n>  \t) &&\n>  \t(\n>  \t\t# Make sure symlink really is empty.  Asking\n> diff --git a/t/t9825-git-p4-handle-utf16-without-bom.sh b/t/t9825-git-p4-handle-utf16-without-bom.sh\n> index f049ff8229..8e34f72198 100755\n> --- a/t/t9825-git-p4-handle-utf16-without-bom.sh\n> +++ b/t/t9825-git-p4-handle-utf16-without-bom.sh\n> @@ -22,9 +22,21 @@ test_expect_success 'init depot with UTF-16 encoded file and artificially remove\n>  \t\tcd db &&\n>  \t\tp4d -jc &&\n>  \t\t# P4D automatically adds a BOM. Remove it here to make the file invalid.\n> -\t\tsed -e \"\\$d\" depot/file1,v >depot/file1,v.new &&\n> -\t\tmv depot/file1,v.new depot/file1,v &&\n> -\t\tprintf \"@$UTF16@\" >>depot/file1,v &&\n> +\t\tcase \"$(echo depot/file1*)\" in\n> +\t\tdepot/file1,v)\n> +\t\t\tsed -e \"\\$d\" depot/file1,v >depot/file1,v.new &&\n> +\t\t\tmv depot/file1,v.new depot/file1,v &&\n> +\t\t\tprintf \"@$UTF16@\" >>depot/file1,v;;\n> +\t\tdepot/file1,d)\n> +\t\t\tpath=\"$(echo depot/file1,d/*.gz)\" &&\n> +\t\t\tgunzip -c \"$path\" >\"$path.unzipped\" &&\n> +\t\t\tsed -e \"\\$d\" \"$path.unzipped\" >\"$path.new\" &&\n> +\t\t\tprintf \"$UTF16\" >>\"$path.new\" &&\n> +\t\t\tgzip -c \"$path.new\" >\"$path\" &&\n> +\t\t\trm \"$path.unzipped\" \"$path.new\";;\n> +\t\t*)\n> +\t\t\tBUG \"unhandled p4d layout\";;\n> +\t\tesac &&\n\nLooks like the same deal here. For the new version we are modifying some\nfile, but first have to uncompress it and then recompress it after it is\nmodified. Again seems reasonable.\n\nThanks\n-Justin\n\n>  \t\tp4d -jrF checkpoint.1\n>  \t)\n>  '\n> -- \n> 2.46.0.rc1.dirty\n> \n\n\n"},{"id":"499652","messageId":"xy2vh6bv6sjixvwd6fifuctozjizxns5evvgnqee5s6snnzb36@5hhtwvdk2a36","threadId":"61828","inReplyTo":"ee5d836b779087890acdad061ef6995642942479.1721740612.git.ps@pks.im","subject":"Re: [PATCH 2/3] ci: update Perforce version to r23.2","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2024-07-30T22:48:38Z","receivedAt":"2024-07-30T22:49:21Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 24/07/23 04:05PM, Patrick Steinhardt wrote:\n> Update our Perforce version from r21.2 to r23.2. Note that the updated\n> version is not the newest version. Instead, it is the last version where\n> the way that Perforce is being distributed remains the same as in r21.2.\n> Newer releases stopped distributing p4 and p4d executablesas well as the\n\ns/executablesas/executables as/\n\n> macOS archives directly and would thus require more work.\n\nOut of curiousity, for Perforce is there a defined range of versions\nthat the Git project supports? I guess I'm trying to figure if it even\nmakes sense to support older version of Perforce in our tests.\n\n> \n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  ci/install-dependencies.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh\n> index 6ec0f85972..b59fd7c1fd 100755\n> --- a/ci/install-dependencies.sh\n> +++ b/ci/install-dependencies.sh\n> @@ -7,7 +7,7 @@\n>  \n>  begin_group \"Install dependencies\"\n>  \n> -P4WHENCE=https://cdist2.perforce.com/perforce/r21.2\n> +P4WHENCE=https://cdist2.perforce.com/perforce/r23.2\n>  LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION\n>  JGITWHENCE=https://repo.eclipse.org/content/groups/releases//org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh\n>  \n> -- \n> 2.46.0.rc1.dirty\n> \n\n\n"},{"id":"499656","messageId":"rid2hs3dx77k5gkvxmhjyaramar7dces5ml6blxwu2tkqfh3x5@3fttesbincxm","threadId":"61828","inReplyTo":"d0a80ba403a59d2d3f05b8336f229ff27caaa9d3.1721740612.git.ps@pks.im","subject":"Re: [PATCH 3/3] t98xx: mark Perforce tests as memory-leak free","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2024-07-30T22:54:59Z","receivedAt":"2024-07-30T22:55:42Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 24/07/23 04:05PM, Patrick Steinhardt wrote:\n> All the Perforce tests are free of memory leaks. This went unnoticed\n> because most folks do not have p4 and p4d installed on their computers.\n> Consequently, given that the prerequisites for running those tests\n> aren't fulfilled, `TEST_PASSES_SANITIZE_LEAK=check` won't notice that\n> those tests are indeed memory leak free.\n> \n> Mark those tests accordingly.\n\nNice to have more tests marked off the list! To me, it makes sense to go\nahead and mark these tests as leak free even if we end up getting rid of\nthem in the future. Thanks\n\n> \n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n"},{"id":"499677","messageId":"ZqoOw_8xDaKLhL99@tanuki","threadId":"61828","inReplyTo":"xy2vh6bv6sjixvwd6fifuctozjizxns5evvgnqee5s6snnzb36@5hhtwvdk2a36","subject":"Re: [PATCH 2/3] ci: update Perforce version to r23.2","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-31T10:15:31Z","receivedAt":"2024-07-31T10:15:37Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Tue, Jul 30, 2024 at 05:48:38PM -0500, Justin Tobler wrote:\n> On 24/07/23 04:05PM, Patrick Steinhardt wrote:\n> > Update our Perforce version from r21.2 to r23.2. Note that the updated\n> > version is not the newest version. Instead, it is the last version where\n> > the way that Perforce is being distributed remains the same as in r21.2.\n> > Newer releases stopped distributing p4 and p4d executablesas well as the\n> \n> s/executablesas/executables as/\n> \n> > macOS archives directly and would thus require more work.\n> \n> Out of curiousity, for Perforce is there a defined range of versions\n> that the Git project supports? I guess I'm trying to figure if it even\n> makes sense to support older version of Perforce in our tests.\n\nNot that I'd know of. Which is why I'm being doubly cautious to\ndeprecate support for older versions :) Not that many people would care,\nbut still, I don't want to make such decisions without having any clue\nat all about the surrounding Perforce ecosystem.\n\nPatrick\n"},{"id":"499679","messageId":"ZqoRvMRp5BZ2B6dA@tanuki","threadId":"61828","inReplyTo":"aw2i5dz2tflrosz3enetxelnal6utk4g7kq7yos3jyssloysng@j2nqbxotdujg","subject":"Re: [PATCH 1/3] t98xx: fix Perforce tests with p4d r23 and newer","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-31T10:28:12Z","receivedAt":"2024-07-31T10:28:16Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Tue, Jul 30, 2024 at 05:41:18PM -0500, Justin Tobler wrote:\n> On 24/07/23 04:05PM, Patrick Steinhardt wrote:\n> > Some of the tests in t98xx modify the Perforce depot in ways that the\n> > tool wouldn't normally allow. This is done to test behaviour of git-p4\n> > in certain edge cases that we have observed in the wild, but which\n> > should in theory not be possible.\n> \n> If in theory these edge cases being tested should not be possible, that\n> sounds like a bug and maybe in newer versions of p4 that is no longer\n> relevant? Does it make sense to even support these rather intimate test\n> cases going forward? Maybe we could instead skip these tests for newer\n> versions?\n\nI wouldn't feel comfortable skipping this without knowing anything about\nthe underlying bug that had been tested in the past. If we removed it,\nthen we'd be second guessing whether or not that bug is still possible.\nSeemingly, it wasn't possible to trigger it without bugs in the past\neither, so it feels like we'd be assuming too much.\n\n> > Naturally, modifying the depot on disk directly is quite intimate with\n> > the tool and thus prone to breakage when Perforce updates the way that\n> > data is stored. And indeed, those tests are broken nowadays with r23 of\n> > Perforce. While a file revision was previously stored as plain file\n> > \"depot/file,v\", it is now stored in a directory \"depot/file,d\" with\n> > compression.\n> \n> s/plain/a plain/\n> \n> This sounds like a bit of a maintenance headache, especially if there\n> are not many eyes on it to begin with. I guess this ties in with other\n> discussion from this thread about whether and of git-p4 should remain in\n> the codebase.\n\nOh, it certainly isn't great. Whether it is a headache remains to be\nseen. If we had to pile onto hacks like this in the future then I'd also\nvote to remove or skip such tests. But we didn't really have to do a lot\nof maintenance for the Perforce tests in the past either, so I rather\nassume that it's going to be okayish in the future, too.\n\nPart of the reason is likely that git-p4 simply isn't well-maintained,\nand the less maintained something is the less churn you have. But for\nnow I only see two ways out of it:\n\n  - Either we get somebody willing to adopt it, and in that case it will\n    be their responsibility to handle such potential headaches. In other\n    words, I'll leave it to them to decide what to do with those tests,\n    also because they are going to be better equipped with knowledge\n    around Perforce itself.\n\n  - Or we remove it, and then it doesn't matter much anyway.\n\nAll to say that I'm merely being pragmatic and punt the issue to the\nfuture.\n\n> > Adapt those tests to handle both old- and new-style depot layouts.\n> > \n> > Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> > ---\n> >  t/t9800-git-p4-basic.sh                    | 13 +++++++++++--\n> >  t/t9802-git-p4-filetype.sh                 | 15 ++++++++++++---\n> >  t/t9825-git-p4-handle-utf16-without-bom.sh | 18 +++++++++++++++---\n> >  3 files changed, 38 insertions(+), 8 deletions(-)\n> > \n> > diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\n> > index 53af8e34ac..4e95622670 100755\n> > --- a/t/t9800-git-p4-basic.sh\n> > +++ b/t/t9800-git-p4-basic.sh\n> > @@ -297,8 +297,17 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '\n> >  # p4 changes, files, or describe; just in p4 print.  If P4CLIENT is unset, the\n> >  # message will include \"Librarian checkout\".\n> >  test_expect_success 'exit gracefully for p4 server errors' '\n> > -\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n> > -\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden &&\n> > +\tcase \"$(echo \"$db\"/depot/file1*)\" in\n> > +\t*,v)\n> > +\t\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n> > +\t\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden;;\n> > +\t*,d)\n> > +\t\tpath=\"$(echo \"$db\"/depot/file1,d/*.gz)\" &&\n> > +\t\ttest_when_finished \"mv \\\"$path\\\",hidden \\\"$path\\\"\" &&\n> > +\t\tmv \"$path\" \"$path\",hidden;;\n> > +\t*)\n> > +\t\tBUG \"unhandled p4d layout\";;\n> > +\tesac &&\n> \n> I'm not familiar with Perforce, but the test looks like it is simply\n> appending \",hidden\" to the file name. I assume this to trigger some\n> error. \n> \n> We are simply extending the test to also perform the same rename if,\n> instead of `depot/file1,f`, a newer version uses `depot/file1,d`.\n> \n> Makes sense to me, but without surrounding context its rather difficult\n> to understand that the \"case\" statement here pertains to different\n> Perforce versions that may be used. It might be nice to have a comment\n> explaining this.\n\nFair, I will add a comment to all three sites.\n\nPatric\n"},{"id":"499680","messageId":"cover.1722421911.git.ps@pks.im","threadId":"61828","inReplyTo":"cover.1721740612.git.ps@pks.im","subject":"[PATCH v2 0/3] Improvements for Perforce tests","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-31T10:37:35Z","receivedAt":"2024-07-31T10:37:41Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nthis is the second version of my patch series that improves Perforce\ntests a bit. As with the first version, the main intent is to mark all\ntests as leak free. The other two patches polish the Perforce tests such\nthat they work on my machine, which has a more recent version of\nPerforce than what we have been testing with in CI.\n\nAs discussed, despite these patches I consider Perforce to be basically\nunmaintained, and my patches do not change that. But given that I don't\nthink we can rip out git-p4(1) just so without any kind of announcement\nup front, I still think that these patches are worth it to help my own\ncause, namely plugging all memory leaks hit by tests in Git.\n\nChanges compared to v1:\n\n  - Fix some typos.\n\n  - Add in-code comments explaining what the compatibility case\n    statements are about.\n\nThanks!\n\nPatrick\n\nPatrick Steinhardt (3):\n  t98xx: fix Perforce tests with p4d r23 and newer\n  ci: update Perforce version to r23.2\n  t98xx: mark Perforce tests as memory-leak free\n\n ci/install-dependencies.sh                  |  2 +-\n t/t9800-git-p4-basic.sh                     | 17 +++++++++++++--\n t/t9801-git-p4-branch.sh                    |  1 +\n t/t9802-git-p4-filetype.sh                  | 19 ++++++++++++++---\n t/t9803-git-p4-shell-metachars.sh           |  1 +\n t/t9804-git-p4-label.sh                     |  1 +\n t/t9805-git-p4-skip-submit-edit.sh          |  1 +\n t/t9806-git-p4-options.sh                   |  1 +\n t/t9808-git-p4-chdir.sh                     |  1 +\n t/t9809-git-p4-client-view.sh               |  1 +\n t/t9810-git-p4-rcs.sh                       |  1 +\n t/t9811-git-p4-label-import.sh              |  1 +\n t/t9812-git-p4-wildcards.sh                 |  1 +\n t/t9813-git-p4-preserve-users.sh            |  1 +\n t/t9814-git-p4-rename.sh                    |  1 +\n t/t9815-git-p4-submit-fail.sh               |  1 +\n t/t9816-git-p4-locked.sh                    |  1 +\n t/t9817-git-p4-exclude.sh                   |  1 +\n t/t9818-git-p4-block.sh                     |  1 +\n t/t9819-git-p4-case-folding.sh              |  1 +\n t/t9820-git-p4-editor-handling.sh           |  1 +\n t/t9821-git-p4-path-variations.sh           |  1 +\n t/t9822-git-p4-path-encoding.sh             |  1 +\n t/t9823-git-p4-mock-lfs.sh                  |  1 +\n t/t9825-git-p4-handle-utf16-without-bom.sh  | 23 ++++++++++++++++++---\n t/t9826-git-p4-keep-empty-commits.sh        |  1 +\n t/t9827-git-p4-change-filetype.sh           |  1 +\n t/t9828-git-p4-map-user.sh                  |  1 +\n t/t9829-git-p4-jobs.sh                      |  1 +\n t/t9830-git-p4-symlink-dir.sh               |  1 +\n t/t9831-git-p4-triggers.sh                  |  1 +\n t/t9832-unshelve.sh                         |  1 +\n t/t9833-errors.sh                           |  1 +\n t/t9834-git-p4-file-dir-bug.sh              |  1 +\n t/t9835-git-p4-metadata-encoding-python2.sh |  1 +\n t/t9836-git-p4-metadata-encoding-python3.sh |  1 +\n 36 files changed, 84 insertions(+), 9 deletions(-)\n\nRange-diff against v1:\n1:  f40f62f257 ! 1:  7f06de7e6b t98xx: fix Perforce tests with p4d r23 and newer\n    @@ Commit message\n         Naturally, modifying the depot on disk directly is quite intimate with\n         the tool and thus prone to breakage when Perforce updates the way that\n         data is stored. And indeed, those tests are broken nowadays with r23 of\n    -    Perforce. While a file revision was previously stored as plain file\n    +    Perforce. While a file revision was previously stored as a plain file\n         \"depot/file,v\", it is now stored in a directory \"depot/file,d\" with\n         compression.\n     \n    @@ t/t9800-git-p4-basic.sh: test_expect_success 'exit when p4 fails to produce mars\n      test_expect_success 'exit gracefully for p4 server errors' '\n     -\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n     -\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden &&\n    ++\t# Note that newer Perforce versions started to store files\n    ++\t# compressed in directories. The case statement handles both\n    ++\t# old and new layout.\n     +\tcase \"$(echo \"$db\"/depot/file1*)\" in\n     +\t*,v)\n     +\t\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n    @@ t/t9800-git-p4-basic.sh: test_expect_success 'exit when p4 fails to produce mars\n     \n      ## t/t9802-git-p4-filetype.sh ##\n     @@ t/t9802-git-p4-filetype.sh: test_expect_success SYMLINKS 'empty symlink target' '\n    + \t\t#     text\n      \t\t#     @@\n      \t\t#\n    ++\t\t# Note that newer Perforce versions started to store files\n    ++\t\t# compressed in directories. The case statement handles both\n    ++\t\t# old and new layout.\n      \t\tcd \"$db/depot\" &&\n     -\t\tsed \"/@target1/{; s/target1/@/; n; d; }\" \\\n     -\t\t    empty-symlink,v >empty-symlink,v.tmp &&\n    @@ t/t9825-git-p4-handle-utf16-without-bom.sh: test_expect_success 'init depot with\n     -\t\tsed -e \"\\$d\" depot/file1,v >depot/file1,v.new &&\n     -\t\tmv depot/file1,v.new depot/file1,v &&\n     -\t\tprintf \"@$UTF16@\" >>depot/file1,v &&\n    ++\t\t#\n    ++\t\t# Note that newer Perforce versions started to store files\n    ++\t\t# compressed in directories. The case statement handles both\n    ++\t\t# old and new layout.\n     +\t\tcase \"$(echo depot/file1*)\" in\n     +\t\tdepot/file1,v)\n     +\t\t\tsed -e \"\\$d\" depot/file1,v >depot/file1,v.new &&\n2:  ee5d836b77 ! 2:  f41473d991 ci: update Perforce version to r23.2\n    @@ Commit message\n         Update our Perforce version from r21.2 to r23.2. Note that the updated\n         version is not the newest version. Instead, it is the last version where\n         the way that Perforce is being distributed remains the same as in r21.2.\n    -    Newer releases stopped distributing p4 and p4d executablesas well as the\n    -    macOS archives directly and would thus require more work.\n    +    Newer releases stopped distributing p4 and p4d executables as well as\n    +    the macOS archives directly and would thus require more work.\n     \n         Signed-off-by: Patrick Steinhardt <ps@pks.im>\n     \n3:  d0a80ba403 = 3:  bf03405db9 t98xx: mark Perforce tests as memory-leak free\n\nbase-commit: d19b6cd2dd72dc811f19df4b32c7ed223256c3ee\n-- \n2.46.0.dirty\n\n"},{"id":"499681","messageId":"7f06de7e6b4c1bb8073f02f948674b36022e0a0f.1722421911.git.ps@pks.im","threadId":"61828","inReplyTo":"cover.1722421911.git.ps@pks.im","subject":"[PATCH v2 1/3] t98xx: fix Perforce tests with p4d r23 and newer","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-31T10:37:40Z","receivedAt":"2024-07-31T10:37:45Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Some of the tests in t98xx modify the Perforce depot in ways that the\ntool wouldn't normally allow. This is done to test behaviour of git-p4\nin certain edge cases that we have observed in the wild, but which\nshould in theory not be possible.\n\nNaturally, modifying the depot on disk directly is quite intimate with\nthe tool and thus prone to breakage when Perforce updates the way that\ndata is stored. And indeed, those tests are broken nowadays with r23 of\nPerforce. While a file revision was previously stored as a plain file\n\"depot/file,v\", it is now stored in a directory \"depot/file,d\" with\ncompression.\n\nAdapt those tests to handle both old- and new-style depot layouts.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t9800-git-p4-basic.sh                    | 16 ++++++++++++++--\n t/t9802-git-p4-filetype.sh                 | 18 +++++++++++++++---\n t/t9825-git-p4-handle-utf16-without-bom.sh | 22 +++++++++++++++++++---\n 3 files changed, 48 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex 53af8e34ac..0816763e46 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -297,8 +297,20 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '\n # p4 changes, files, or describe; just in p4 print.  If P4CLIENT is unset, the\n # message will include \"Librarian checkout\".\n test_expect_success 'exit gracefully for p4 server errors' '\n-\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n-\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden &&\n+\t# Note that newer Perforce versions started to store files\n+\t# compressed in directories. The case statement handles both\n+\t# old and new layout.\n+\tcase \"$(echo \"$db\"/depot/file1*)\" in\n+\t*,v)\n+\t\ttest_when_finished \"mv \\\"$db\\\"/depot/file1,v,hidden \\\"$db\\\"/depot/file1,v\" &&\n+\t\tmv \"$db\"/depot/file1,v \"$db\"/depot/file1,v,hidden;;\n+\t*,d)\n+\t\tpath=\"$(echo \"$db\"/depot/file1,d/*.gz)\" &&\n+\t\ttest_when_finished \"mv \\\"$path\\\",hidden \\\"$path\\\"\" &&\n+\t\tmv \"$path\" \"$path\",hidden;;\n+\t*)\n+\t\tBUG \"unhandled p4d layout\";;\n+\tesac &&\n \ttest_when_finished cleanup_git &&\n \ttest_expect_code 1 git p4 clone --dest=\"$git\" //depot@1 >out 2>err &&\n \ttest_grep \"Error from p4 print\" err\ndiff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh\nindex bb236cd2b5..df01a5d338 100755\n--- a/t/t9802-git-p4-filetype.sh\n+++ b/t/t9802-git-p4-filetype.sh\n@@ -300,10 +300,22 @@ test_expect_success SYMLINKS 'empty symlink target' '\n \t\t#     text\n \t\t#     @@\n \t\t#\n+\t\t# Note that newer Perforce versions started to store files\n+\t\t# compressed in directories. The case statement handles both\n+\t\t# old and new layout.\n \t\tcd \"$db/depot\" &&\n-\t\tsed \"/@target1/{; s/target1/@/; n; d; }\" \\\n-\t\t    empty-symlink,v >empty-symlink,v.tmp &&\n-\t\tmv empty-symlink,v.tmp empty-symlink,v\n+\t\tcase \"$(echo empty-symlink*)\" in\n+\t\tempty-symlink,v)\n+\t\t\tsed \"/@target1/{; s/target1/@/; n; d; }\" \\\n+\t\t\t    empty-symlink,v >empty-symlink,v.tmp &&\n+\t\t\tmv empty-symlink,v.tmp empty-symlink,v;;\n+\t\tempty-symlink,d)\n+\t\t\tpath=\"empty-symlink,d/$(ls empty-symlink,d/ | tail -n1)\" &&\n+\t\t\trm \"$path\" &&\n+\t\t\tgzip </dev/null >\"$path\";;\n+\t\t*)\n+\t\t\tBUG \"unhandled p4d layout\";;\n+\t\tesac\n \t) &&\n \t(\n \t\t# Make sure symlink really is empty.  Asking\ndiff --git a/t/t9825-git-p4-handle-utf16-without-bom.sh b/t/t9825-git-p4-handle-utf16-without-bom.sh\nindex f049ff8229..6a60b32349 100755\n--- a/t/t9825-git-p4-handle-utf16-without-bom.sh\n+++ b/t/t9825-git-p4-handle-utf16-without-bom.sh\n@@ -22,9 +22,25 @@ test_expect_success 'init depot with UTF-16 encoded file and artificially remove\n \t\tcd db &&\n \t\tp4d -jc &&\n \t\t# P4D automatically adds a BOM. Remove it here to make the file invalid.\n-\t\tsed -e \"\\$d\" depot/file1,v >depot/file1,v.new &&\n-\t\tmv depot/file1,v.new depot/file1,v &&\n-\t\tprintf \"@$UTF16@\" >>depot/file1,v &&\n+\t\t#\n+\t\t# Note that newer Perforce versions started to store files\n+\t\t# compressed in directories. The case statement handles both\n+\t\t# old and new layout.\n+\t\tcase \"$(echo depot/file1*)\" in\n+\t\tdepot/file1,v)\n+\t\t\tsed -e \"\\$d\" depot/file1,v >depot/file1,v.new &&\n+\t\t\tmv depot/file1,v.new depot/file1,v &&\n+\t\t\tprintf \"@$UTF16@\" >>depot/file1,v;;\n+\t\tdepot/file1,d)\n+\t\t\tpath=\"$(echo depot/file1,d/*.gz)\" &&\n+\t\t\tgunzip -c \"$path\" >\"$path.unzipped\" &&\n+\t\t\tsed -e \"\\$d\" \"$path.unzipped\" >\"$path.new\" &&\n+\t\t\tprintf \"$UTF16\" >>\"$path.new\" &&\n+\t\t\tgzip -c \"$path.new\" >\"$path\" &&\n+\t\t\trm \"$path.unzipped\" \"$path.new\";;\n+\t\t*)\n+\t\t\tBUG \"unhandled p4d layout\";;\n+\t\tesac &&\n \t\tp4d -jrF checkpoint.1\n \t)\n '\n-- \n2.46.0.dirty\n\n"},{"id":"499682","messageId":"f41473d991e197bb5722aca877b8fa72354ea770.1722421911.git.ps@pks.im","threadId":"61828","inReplyTo":"cover.1722421911.git.ps@pks.im","subject":"[PATCH v2 2/3] ci: update Perforce version to r23.2","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-31T10:37:45Z","receivedAt":"2024-07-31T10:37:49Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Update our Perforce version from r21.2 to r23.2. Note that the updated\nversion is not the newest version. Instead, it is the last version where\nthe way that Perforce is being distributed remains the same as in r21.2.\nNewer releases stopped distributing p4 and p4d executables as well as\nthe macOS archives directly and would thus require more work.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n ci/install-dependencies.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh\nindex 6ec0f85972..b59fd7c1fd 100755\n--- a/ci/install-dependencies.sh\n+++ b/ci/install-dependencies.sh\n@@ -7,7 +7,7 @@\n \n begin_group \"Install dependencies\"\n \n-P4WHENCE=https://cdist2.perforce.com/perforce/r21.2\n+P4WHENCE=https://cdist2.perforce.com/perforce/r23.2\n LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION\n JGITWHENCE=https://repo.eclipse.org/content/groups/releases//org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh\n \n-- \n2.46.0.dirty\n\n"},{"id":"499683","messageId":"bf03405db9764360cb75ce780c3fa22e013fb992.1722421911.git.ps@pks.im","threadId":"61828","inReplyTo":"cover.1722421911.git.ps@pks.im","subject":"[PATCH v2 3/3] t98xx: mark Perforce tests as memory-leak free","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-07-31T10:37:56Z","receivedAt":"2024-07-31T10:38:00Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"All the Perforce tests are free of memory leaks. This went unnoticed\nbecause most folks do not have p4 and p4d installed on their computers.\nConsequently, given that the prerequisites for running those tests\naren't fulfilled, `TEST_PASSES_SANITIZE_LEAK=check` won't notice that\nthose tests are indeed memory leak free.\n\nMark those tests accordingly.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t9800-git-p4-basic.sh                     | 1 +\n t/t9801-git-p4-branch.sh                    | 1 +\n t/t9802-git-p4-filetype.sh                  | 1 +\n t/t9803-git-p4-shell-metachars.sh           | 1 +\n t/t9804-git-p4-label.sh                     | 1 +\n t/t9805-git-p4-skip-submit-edit.sh          | 1 +\n t/t9806-git-p4-options.sh                   | 1 +\n t/t9808-git-p4-chdir.sh                     | 1 +\n t/t9809-git-p4-client-view.sh               | 1 +\n t/t9810-git-p4-rcs.sh                       | 1 +\n t/t9811-git-p4-label-import.sh              | 1 +\n t/t9812-git-p4-wildcards.sh                 | 1 +\n t/t9813-git-p4-preserve-users.sh            | 1 +\n t/t9814-git-p4-rename.sh                    | 1 +\n t/t9815-git-p4-submit-fail.sh               | 1 +\n t/t9816-git-p4-locked.sh                    | 1 +\n t/t9817-git-p4-exclude.sh                   | 1 +\n t/t9818-git-p4-block.sh                     | 1 +\n t/t9819-git-p4-case-folding.sh              | 1 +\n t/t9820-git-p4-editor-handling.sh           | 1 +\n t/t9821-git-p4-path-variations.sh           | 1 +\n t/t9822-git-p4-path-encoding.sh             | 1 +\n t/t9823-git-p4-mock-lfs.sh                  | 1 +\n t/t9825-git-p4-handle-utf16-without-bom.sh  | 1 +\n t/t9826-git-p4-keep-empty-commits.sh        | 1 +\n t/t9827-git-p4-change-filetype.sh           | 1 +\n t/t9828-git-p4-map-user.sh                  | 1 +\n t/t9829-git-p4-jobs.sh                      | 1 +\n t/t9830-git-p4-symlink-dir.sh               | 1 +\n t/t9831-git-p4-triggers.sh                  | 1 +\n t/t9832-unshelve.sh                         | 1 +\n t/t9833-errors.sh                           | 1 +\n t/t9834-git-p4-file-dir-bug.sh              | 1 +\n t/t9835-git-p4-metadata-encoding-python2.sh | 1 +\n t/t9836-git-p4-metadata-encoding-python3.sh | 1 +\n 35 files changed, 35 insertions(+)\n\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex 0816763e46..3e6dfce248 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -5,6 +5,7 @@ test_description='git p4 tests'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex c598011635..cdbfacc727 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -5,6 +5,7 @@ test_description='git p4 tests for p4 branches'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh\nindex df01a5d338..1bc48305b0 100755\n--- a/t/t9802-git-p4-filetype.sh\n+++ b/t/t9802-git-p4-filetype.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 filetype tests'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh\nindex 2913277013..ab7fe16266 100755\n--- a/t/t9803-git-p4-shell-metachars.sh\n+++ b/t/t9803-git-p4-shell-metachars.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 transparency to shell metachars in filenames'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9804-git-p4-label.sh b/t/t9804-git-p4-label.sh\nindex 3236457106..c8963fd398 100755\n--- a/t/t9804-git-p4-label.sh\n+++ b/t/t9804-git-p4-label.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 label tests'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9805-git-p4-skip-submit-edit.sh b/t/t9805-git-p4-skip-submit-edit.sh\nindex 90ef647db7..72dce3d2b4 100755\n--- a/t/t9805-git-p4-skip-submit-edit.sh\n+++ b/t/t9805-git-p4-skip-submit-edit.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 skipSubmitEdit config variables'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh\nindex c26d297433..e4ce44ebf3 100755\n--- a/t/t9806-git-p4-options.sh\n+++ b/t/t9806-git-p4-options.sh\n@@ -5,6 +5,7 @@ test_description='git p4 options'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9808-git-p4-chdir.sh b/t/t9808-git-p4-chdir.sh\nindex 58a9b3b71e..342f7f3d4a 100755\n--- a/t/t9808-git-p4-chdir.sh\n+++ b/t/t9808-git-p4-chdir.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 relative chdir'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh\nindex 9c9710d8c7..f33fdea889 100755\n--- a/t/t9809-git-p4-client-view.sh\n+++ b/t/t9809-git-p4-client-view.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 client view'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9810-git-p4-rcs.sh b/t/t9810-git-p4-rcs.sh\nindex 5fe83315ec..15e32c9f35 100755\n--- a/t/t9810-git-p4-rcs.sh\n+++ b/t/t9810-git-p4-rcs.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 rcs keywords'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n CP1252=\"\\223\\224\"\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex 5ac5383fb7..52a4b0af81 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -5,6 +5,7 @@ test_description='git p4 label tests'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9812-git-p4-wildcards.sh b/t/t9812-git-p4-wildcards.sh\nindex 254a7c2446..46aa5fd56c 100755\n--- a/t/t9812-git-p4-wildcards.sh\n+++ b/t/t9812-git-p4-wildcards.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 wildcards'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9813-git-p4-preserve-users.sh b/t/t9813-git-p4-preserve-users.sh\nindex fd018c87a8..0efea28da2 100755\n--- a/t/t9813-git-p4-preserve-users.sh\n+++ b/t/t9813-git-p4-preserve-users.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 preserve users'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh\nindex 2a9838f37f..00df6ebd3b 100755\n--- a/t/t9814-git-p4-rename.sh\n+++ b/t/t9814-git-p4-rename.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 rename'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh\nindex c766fd159f..92ef9d8c24 100755\n--- a/t/t9815-git-p4-submit-fail.sh\n+++ b/t/t9815-git-p4-submit-fail.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 submit failure handling'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9816-git-p4-locked.sh b/t/t9816-git-p4-locked.sh\nindex 5e904ac80d..e687fbc25f 100755\n--- a/t/t9816-git-p4-locked.sh\n+++ b/t/t9816-git-p4-locked.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 locked file behavior'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9817-git-p4-exclude.sh b/t/t9817-git-p4-exclude.sh\nindex ec3d937c6a..3deb334fed 100755\n--- a/t/t9817-git-p4-exclude.sh\n+++ b/t/t9817-git-p4-exclude.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 tests for excluded paths during clone and sync'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9818-git-p4-block.sh b/t/t9818-git-p4-block.sh\nindex de591d875c..091bb72bdb 100755\n--- a/t/t9818-git-p4-block.sh\n+++ b/t/t9818-git-p4-block.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 fetching changes in multiple blocks'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9819-git-p4-case-folding.sh b/t/t9819-git-p4-case-folding.sh\nindex b4d93f0c17..985be20357 100755\n--- a/t/t9819-git-p4-case-folding.sh\n+++ b/t/t9819-git-p4-case-folding.sh\n@@ -2,6 +2,7 @@\n \n test_description='interaction with P4 case-folding'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n if test_have_prereq CASE_INSENSITIVE_FS\ndiff --git a/t/t9820-git-p4-editor-handling.sh b/t/t9820-git-p4-editor-handling.sh\nindex fa1bba1dd9..48e4dfb95c 100755\n--- a/t/t9820-git-p4-editor-handling.sh\n+++ b/t/t9820-git-p4-editor-handling.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 handling of EDITOR'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh\nindex ef80f1690b..49691c53da 100755\n--- a/t/t9821-git-p4-path-variations.sh\n+++ b/t/t9821-git-p4-path-variations.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories with path case variations'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d with case folding enabled' '\ndiff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh\nindex 572d395498..e62ed49f51 100755\n--- a/t/t9822-git-p4-path-encoding.sh\n+++ b/t/t9822-git-p4-path-encoding.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories with non ASCII paths'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n UTF8_ESCAPED=\"a-\\303\\244_o-\\303\\266_u-\\303\\274.txt\"\ndiff --git a/t/t9823-git-p4-mock-lfs.sh b/t/t9823-git-p4-mock-lfs.sh\nindex 88b76dc4d6..98a40d8af3 100755\n--- a/t/t9823-git-p4-mock-lfs.sh\n+++ b/t/t9823-git-p4-mock-lfs.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories and store files in Mock LFS'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_file_is_not_in_mock_lfs () {\ndiff --git a/t/t9825-git-p4-handle-utf16-without-bom.sh b/t/t9825-git-p4-handle-utf16-without-bom.sh\nindex 6a60b32349..d0b86537dd 100755\n--- a/t/t9825-git-p4-handle-utf16-without-bom.sh\n+++ b/t/t9825-git-p4-handle-utf16-without-bom.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 handling of UTF-16 files without BOM'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n UTF16=\"\\227\\000\\227\\000\"\ndiff --git a/t/t9826-git-p4-keep-empty-commits.sh b/t/t9826-git-p4-keep-empty-commits.sh\nindex fd64afe064..54083f842e 100755\n--- a/t/t9826-git-p4-keep-empty-commits.sh\n+++ b/t/t9826-git-p4-keep-empty-commits.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories and keep empty commits'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9827-git-p4-change-filetype.sh b/t/t9827-git-p4-change-filetype.sh\nindex d3670bd7a2..3476ea2fd3 100755\n--- a/t/t9827-git-p4-change-filetype.sh\n+++ b/t/t9827-git-p4-change-filetype.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 support for file type change'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9828-git-p4-map-user.sh b/t/t9828-git-p4-map-user.sh\nindex ca6c2942bd..7c8f9e3930 100755\n--- a/t/t9828-git-p4-map-user.sh\n+++ b/t/t9828-git-p4-map-user.sh\n@@ -2,6 +2,7 @@\n \n test_description='Clone repositories and map users'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9829-git-p4-jobs.sh b/t/t9829-git-p4-jobs.sh\nindex 88cfb1fcd3..3fc0948d9c 100755\n--- a/t/t9829-git-p4-jobs.sh\n+++ b/t/t9829-git-p4-jobs.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 retrieve job info'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9830-git-p4-symlink-dir.sh b/t/t9830-git-p4-symlink-dir.sh\nindex 3fb6960c18..02561a7f0e 100755\n--- a/t/t9830-git-p4-symlink-dir.sh\n+++ b/t/t9830-git-p4-symlink-dir.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 symlinked directories'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9831-git-p4-triggers.sh b/t/t9831-git-p4-triggers.sh\nindex ff6c0352e6..f287f41e37 100755\n--- a/t/t9831-git-p4-triggers.sh\n+++ b/t/t9831-git-p4-triggers.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 with server triggers'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9832-unshelve.sh b/t/t9832-unshelve.sh\nindex 6b3cb0414a..a266775408 100755\n--- a/t/t9832-unshelve.sh\n+++ b/t/t9832-unshelve.sh\n@@ -6,6 +6,7 @@ last_shelved_change () {\n \n test_description='git p4 unshelve'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9833-errors.sh b/t/t9833-errors.sh\nindex e22369ccdf..da1d30c142 100755\n--- a/t/t9833-errors.sh\n+++ b/t/t9833-errors.sh\n@@ -2,6 +2,7 @@\n \n test_description='git p4 errors'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9834-git-p4-file-dir-bug.sh b/t/t9834-git-p4-file-dir-bug.sh\nindex dac67e89d7..565870fc74 100755\n--- a/t/t9834-git-p4-file-dir-bug.sh\n+++ b/t/t9834-git-p4-file-dir-bug.sh\n@@ -6,6 +6,7 @@ This test creates files and directories with the same name in perforce and\n checks that git-p4 recovers from the error at the same time as the perforce\n repository.'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9835-git-p4-metadata-encoding-python2.sh b/t/t9835-git-p4-metadata-encoding-python2.sh\nindex 036bf79c66..ad20ffdede 100755\n--- a/t/t9835-git-p4-metadata-encoding-python2.sh\n+++ b/t/t9835-git-p4-metadata-encoding-python2.sh\n@@ -6,6 +6,7 @@ This test checks that the import process handles inconsistent text\n encoding in p4 metadata (author names, commit messages, etc) without\n failing, and produces maximally sane output in git.'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n python_target_version='2'\ndiff --git a/t/t9836-git-p4-metadata-encoding-python3.sh b/t/t9836-git-p4-metadata-encoding-python3.sh\nindex 63350dc4b5..71ae763399 100755\n--- a/t/t9836-git-p4-metadata-encoding-python3.sh\n+++ b/t/t9836-git-p4-metadata-encoding-python3.sh\n@@ -6,6 +6,7 @@ This test checks that the import process handles inconsistent text\n encoding in p4 metadata (author names, commit messages, etc) without\n failing, and produces maximally sane output in git.'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./lib-git-p4.sh\n \n python_target_version='3'\n-- \n2.46.0.dirty\n\n"},{"id":"499741","messageId":"na5mwletzpnacietbc7pzqcgb622mvrwgrkjgjosysz3gvjcso@gzxxi7d7icr7","threadId":"61828","inReplyTo":"cover.1722421911.git.ps@pks.im","subject":"Re: [PATCH v2 0/3] Improvements for Perforce tests","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2024-07-31T20:50:32Z","receivedAt":"2024-07-31T20:51:31Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 24/07/31 12:37PM, Patrick Steinhardt wrote:\n> Hi,\n> \n> this is the second version of my patch series that improves Perforce\n> tests a bit. As with the first version, the main intent is to mark all\n> tests as leak free. The other two patches polish the Perforce tests such\n> that they work on my machine, which has a more recent version of\n> Perforce than what we have been testing with in CI.\n> \n> As discussed, despite these patches I consider Perforce to be basically\n> unmaintained, and my patches do not change that. But given that I don't\n> think we can rip out git-p4(1) just so without any kind of announcement\n> up front, I still think that these patches are worth it to help my own\n> cause, namely plugging all memory leaks hit by tests in Git.\n\nAgreed that proposing a removal of git-p4(1) is more of a separate issue\nhere. For now, these patches make sense so we can get closer to making\nthe tests memory leak free. :)\n\n> \n> Changes compared to v1:\n> \n>   - Fix some typos.\n> \n>   - Add in-code comments explaining what the compatibility case\n>     statements are about.\n> \n> Thanks!\n> \n> Patrick\n\nFrom looking at the range diff, this version looks good to me. Thanks\n\n-Justin\n"},{"id":"499753","messageId":"xmqqh6c5yyyq.fsf@gitster.g","threadId":"61828","inReplyTo":"na5mwletzpnacietbc7pzqcgb622mvrwgrkjgjosysz3gvjcso@gzxxi7d7icr7","subject":"Re: [PATCH v2 0/3] Improvements for Perforce tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-31T22:32:29Z","receivedAt":"2024-07-31T22:32:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Justin Tobler <jltobler@gmail.com> writes:\n\n> From looking at the range diff, this version looks good to me. Thanks\n\nThanks, both.  Perhaps I should mark this for 'next' by now.\n\n"}]}