git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Justin Tobler <jltobler@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 0/3] Improvements for Perforce tests
Date: Wed, 31 Jul 2024 12:37:35 +0200	[thread overview]
Message-ID: <cover.1722421911.git.ps@pks.im> (raw)
In-Reply-To: <cover.1721740612.git.ps@pks.im>

[-- Attachment #1: Type: text/plain, Size: 6293 bytes --]

Hi,

this is the second version of my patch series that improves Perforce
tests a bit. As with the first version, the main intent is to mark all
tests as leak free. The other two patches polish the Perforce tests such
that they work on my machine, which has a more recent version of
Perforce than what we have been testing with in CI.

As discussed, despite these patches I consider Perforce to be basically
unmaintained, and my patches do not change that. But given that I don't
think we can rip out git-p4(1) just so without any kind of announcement
up front, I still think that these patches are worth it to help my own
cause, namely plugging all memory leaks hit by tests in Git.

Changes compared to v1:

  - Fix some typos.

  - Add in-code comments explaining what the compatibility case
    statements are about.

Thanks!

Patrick

Patrick Steinhardt (3):
  t98xx: fix Perforce tests with p4d r23 and newer
  ci: update Perforce version to r23.2
  t98xx: mark Perforce tests as memory-leak free

 ci/install-dependencies.sh                  |  2 +-
 t/t9800-git-p4-basic.sh                     | 17 +++++++++++++--
 t/t9801-git-p4-branch.sh                    |  1 +
 t/t9802-git-p4-filetype.sh                  | 19 ++++++++++++++---
 t/t9803-git-p4-shell-metachars.sh           |  1 +
 t/t9804-git-p4-label.sh                     |  1 +
 t/t9805-git-p4-skip-submit-edit.sh          |  1 +
 t/t9806-git-p4-options.sh                   |  1 +
 t/t9808-git-p4-chdir.sh                     |  1 +
 t/t9809-git-p4-client-view.sh               |  1 +
 t/t9810-git-p4-rcs.sh                       |  1 +
 t/t9811-git-p4-label-import.sh              |  1 +
 t/t9812-git-p4-wildcards.sh                 |  1 +
 t/t9813-git-p4-preserve-users.sh            |  1 +
 t/t9814-git-p4-rename.sh                    |  1 +
 t/t9815-git-p4-submit-fail.sh               |  1 +
 t/t9816-git-p4-locked.sh                    |  1 +
 t/t9817-git-p4-exclude.sh                   |  1 +
 t/t9818-git-p4-block.sh                     |  1 +
 t/t9819-git-p4-case-folding.sh              |  1 +
 t/t9820-git-p4-editor-handling.sh           |  1 +
 t/t9821-git-p4-path-variations.sh           |  1 +
 t/t9822-git-p4-path-encoding.sh             |  1 +
 t/t9823-git-p4-mock-lfs.sh                  |  1 +
 t/t9825-git-p4-handle-utf16-without-bom.sh  | 23 ++++++++++++++++++---
 t/t9826-git-p4-keep-empty-commits.sh        |  1 +
 t/t9827-git-p4-change-filetype.sh           |  1 +
 t/t9828-git-p4-map-user.sh                  |  1 +
 t/t9829-git-p4-jobs.sh                      |  1 +
 t/t9830-git-p4-symlink-dir.sh               |  1 +
 t/t9831-git-p4-triggers.sh                  |  1 +
 t/t9832-unshelve.sh                         |  1 +
 t/t9833-errors.sh                           |  1 +
 t/t9834-git-p4-file-dir-bug.sh              |  1 +
 t/t9835-git-p4-metadata-encoding-python2.sh |  1 +
 t/t9836-git-p4-metadata-encoding-python3.sh |  1 +
 36 files changed, 84 insertions(+), 9 deletions(-)

Range-diff against v1:
1:  f40f62f257 ! 1:  7f06de7e6b t98xx: fix Perforce tests with p4d r23 and newer
    @@ Commit message
         Naturally, modifying the depot on disk directly is quite intimate with
         the tool and thus prone to breakage when Perforce updates the way that
         data is stored. And indeed, those tests are broken nowadays with r23 of
    -    Perforce. While a file revision was previously stored as plain file
    +    Perforce. While a file revision was previously stored as a plain file
         "depot/file,v", it is now stored in a directory "depot/file,d" with
         compression.
     
    @@ t/t9800-git-p4-basic.sh: test_expect_success 'exit when p4 fails to produce mars
      test_expect_success 'exit gracefully for p4 server errors' '
     -	test_when_finished "mv \"$db\"/depot/file1,v,hidden \"$db\"/depot/file1,v" &&
     -	mv "$db"/depot/file1,v "$db"/depot/file1,v,hidden &&
    ++	# Note that newer Perforce versions started to store files
    ++	# compressed in directories. The case statement handles both
    ++	# old and new layout.
     +	case "$(echo "$db"/depot/file1*)" in
     +	*,v)
     +		test_when_finished "mv \"$db\"/depot/file1,v,hidden \"$db\"/depot/file1,v" &&
    @@ t/t9800-git-p4-basic.sh: test_expect_success 'exit when p4 fails to produce mars
     
      ## t/t9802-git-p4-filetype.sh ##
     @@ t/t9802-git-p4-filetype.sh: test_expect_success SYMLINKS 'empty symlink target' '
    + 		#     text
      		#     @@
      		#
    ++		# Note that newer Perforce versions started to store files
    ++		# compressed in directories. The case statement handles both
    ++		# old and new layout.
      		cd "$db/depot" &&
     -		sed "/@target1/{; s/target1/@/; n; d; }" \
     -		    empty-symlink,v >empty-symlink,v.tmp &&
    @@ t/t9825-git-p4-handle-utf16-without-bom.sh: test_expect_success 'init depot with
     -		sed -e "\$d" depot/file1,v >depot/file1,v.new &&
     -		mv depot/file1,v.new depot/file1,v &&
     -		printf "@$UTF16@" >>depot/file1,v &&
    ++		#
    ++		# Note that newer Perforce versions started to store files
    ++		# compressed in directories. The case statement handles both
    ++		# old and new layout.
     +		case "$(echo depot/file1*)" in
     +		depot/file1,v)
     +			sed -e "\$d" depot/file1,v >depot/file1,v.new &&
2:  ee5d836b77 ! 2:  f41473d991 ci: update Perforce version to r23.2
    @@ Commit message
         Update our Perforce version from r21.2 to r23.2. Note that the updated
         version is not the newest version. Instead, it is the last version where
         the way that Perforce is being distributed remains the same as in r21.2.
    -    Newer releases stopped distributing p4 and p4d executablesas well as the
    -    macOS archives directly and would thus require more work.
    +    Newer releases stopped distributing p4 and p4d executables as well as
    +    the macOS archives directly and would thus require more work.
     
         Signed-off-by: Patrick Steinhardt <ps@pks.im>
     
3:  d0a80ba403 = 3:  bf03405db9 t98xx: mark Perforce tests as memory-leak free

base-commit: d19b6cd2dd72dc811f19df4b32c7ed223256c3ee
-- 
2.46.0.dirty


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2024-07-31 10:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 14:05 [PATCH 0/3] Improvements for Perforce tests Patrick Steinhardt
2024-07-23 14:05 ` [PATCH 1/3] t98xx: fix Perforce tests with p4d r23 and newer Patrick Steinhardt
2024-07-30 22:41   ` Justin Tobler
2024-07-31 10:28     ` Patrick Steinhardt
2024-07-23 14:05 ` [PATCH 2/3] ci: update Perforce version to r23.2 Patrick Steinhardt
2024-07-24  8:39   ` Johannes Schindelin
2024-07-24  9:01     ` Patrick Steinhardt
2024-07-24 16:10       ` Junio C Hamano
2024-07-30  6:00         ` Patrick Steinhardt
2024-07-30 22:48   ` Justin Tobler
2024-07-31 10:15     ` Patrick Steinhardt
2024-07-23 14:05 ` [PATCH 3/3] t98xx: mark Perforce tests as memory-leak free Patrick Steinhardt
2024-07-30 22:54   ` Justin Tobler
2024-07-31 10:37 ` Patrick Steinhardt [this message]
2024-07-31 10:37   ` [PATCH v2 1/3] t98xx: fix Perforce tests with p4d r23 and newer Patrick Steinhardt
2024-07-31 10:37   ` [PATCH v2 2/3] ci: update Perforce version to r23.2 Patrick Steinhardt
2024-07-31 10:37   ` [PATCH v2 3/3] t98xx: mark Perforce tests as memory-leak free Patrick Steinhardt
2024-07-31 20:50   ` [PATCH v2 0/3] Improvements for Perforce tests Justin Tobler
2024-07-31 22:32     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1722421911.git.ps@pks.im \
    --to=ps@pks.im \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jltobler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).