Git development
 help / color / mirror / Atom feed
From: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH v2 03/20] t9300: make the series T tests self-contained
Date: Thu, 19 Nov 2026 18:15:58 +0530	[thread overview]
Message-ID: <745fe055-3032-4630-b33f-f215b845782a@gmail.com> (raw)
In-Reply-To: <20261112-kn-fast-import-tests-1-v2-3-b8c3a0ab27e8@gmail.com>

On 11/12/26 23:04, Karthik Nayak wrote:

> @@ -3602,38 +3602,58 @@ test_path_eol_quoted_fail 'ls (without dataref in commit)' 'ls ' path
>   ###
>   ### series T (ls)
>   ###
> -# Setup is carried over from series S.
>   
>   for root in '""' ''
>   do
>   	test_expect_success "T: ls root ($root) tree" '
> -		sed -e "s/Z\$//" >expect <<-EOF &&
> -		040000 tree $(git rev-parse S^{tree})	Z
> -		EOF
> -		sha1=$(git rev-parse --verify S) &&
> -		git fast-import --import-marks=marks <<-EOF >actual &&
> -		ls $sha1 $root
> -		EOF
> -		test_cmp expect actual
> +		test_when_finished "rm -rf repo" &&
> +		git init repo &&
> +		(
> +			cd repo &&
> +			test_commit one &&
> +
> +			sed -e "s/Z\$//" >expect <<-EOF &&
> +			040000 tree $(git rev-parse HEAD^{tree})	Z
> +			EOF
> +			sha1=$(git rev-parse --verify HEAD) &&
> +			git fast-import <<-EOF >actual &&
> +			ls $sha1 $root
> +			EOF
> +			test_cmp expect actual
> +		)
>   	'
>   done
>   

We lose the --import-marks dependency from series S as the commit 
message indicated.


>   [ ... snip ... ]
>   
>   test_expect_success 'T: empty reset doesnt delete branch' '
> -	git branch not-to-delete &&
> -	git fast-import <<-EOF &&
> -	reset refs/heads/not-to-delete
> -	EOF
> -	git show-ref &&
> -	git rev-parse --verify refs/heads/not-to-delete
> +	test_when_finished "rm -rf repo" &&
> +	git init repo &&
> +	(
> +		cd repo &&
> +		test_commit one &&
> +
> +		git branch not-to-delete &&
> +		git fast-import <<-EOF &&
> +		reset refs/heads/not-to-delete
> +		EOF
> +		git show-ref &&
> +		git rev-parse --verify refs/heads/not-to-delete
> +	)
>   '
>   
>   ###
> 

The rest is just wrapping of test body within a subshell to make them 
get their own repository.

Looks good to me.

-- 
Sivaraam


  reply	other threads:[~2026-11-19 12:46 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 11:49 [PATCH 00/20] t9300: group and move tests to other files Karthik Nayak
2026-11-10 11:49 ` [PATCH 01/20] t9300: move 'fastimport.unpackLimit' to the required test Karthik Nayak
2026-11-10 11:49 ` [PATCH 02/20] t9300: make the series B tests self-contained Karthik Nayak
2026-11-10 11:49 ` [PATCH 03/20] t9300: make the series T " Karthik Nayak
2026-11-10 11:49 ` [PATCH 04/20] t9300: make the series S " Karthik Nayak
2026-11-10 11:49 ` [PATCH 05/20] t9300: make the series V " Karthik Nayak
2026-11-10 11:49 ` [PATCH 06/20] t9300: make the series Q " Karthik Nayak
2026-11-10 11:49 ` [PATCH 07/20] t9300: make the series P " Karthik Nayak
2026-11-10 11:49 ` [PATCH 08/20] t9300: make the series O " Karthik Nayak
2026-11-10 11:49 ` [PATCH 09/20] t9300: make the big blob " Karthik Nayak
2026-11-10 11:49 ` [PATCH 10/20] t9300: make the ref update " Karthik Nayak
2026-11-10 11:49 ` [PATCH 11/20] t9300: make the date format " Karthik Nayak
2026-11-10 11:49 ` [PATCH 12/20] t9300: make the pack edges test self-contained Karthik Nayak
2026-11-10 11:49 ` [PATCH 13/20] t9300: make the marks tests self-contained Karthik Nayak
2026-11-10 11:49 ` [PATCH 14/20] t9300: make the series Y " Karthik Nayak
2026-11-10 11:50 ` [PATCH 15/20] t9300: make the cat-blob " Karthik Nayak
2026-11-10 11:50 ` [PATCH 16/20] t9300: make the feature and option " Karthik Nayak
2026-11-10 11:50 ` [PATCH 17/20] t9300: make the stream " Karthik Nayak
2026-11-10 11:50 ` [PATCH 18/20] t9300: make the get-mark and encoding " Karthik Nayak
2026-11-10 11:50 ` [PATCH 19/20] t9300: move self-contained tests into dedicated files Karthik Nayak
2026-11-10 11:50 ` [PATCH 20/20] t93xx: drop the series letter from the moved test names Karthik Nayak
2026-11-10 16:45 ` [PATCH 00/20] t9300: group and move tests to other files Junio C Hamano
2026-11-10 20:06   ` Junio C Hamano
2026-11-11 11:22     ` Karthik Nayak
2026-11-12 17:34 ` [PATCH v2 " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 01/20] t9300: move 'fastimport.unpackLimit' to the required test Karthik Nayak
2026-11-19 10:06     ` Kaartic Sivaraam
2026-11-12 17:34   ` [PATCH v2 02/20] t9300: make the series B tests self-contained Karthik Nayak
2026-11-19 12:22     ` Kaartic Sivaraam
2026-11-12 17:34   ` [PATCH v2 03/20] t9300: make the series T " Karthik Nayak
2026-11-19 12:45     ` Kaartic Sivaraam [this message]
2026-11-12 17:34   ` [PATCH v2 04/20] t9300: make the series S " Karthik Nayak
2026-11-19 18:27     ` Kaartic Sivaraam
2026-11-12 17:34   ` [PATCH v2 05/20] t9300: make the series V " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 06/20] t9300: make the series Q " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 07/20] t9300: make the series P " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 08/20] t9300: make the series O " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 09/20] t9300: make the big blob " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 10/20] t9300: make the ref update " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 11/20] t9300: make the date format " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 12/20] t9300: make the pack edges test self-contained Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 13/20] t9300: make the marks tests self-contained Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 14/20] t9300: make the series Y " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 15/20] t9300: make the cat-blob " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 16/20] t9300: make the feature and option " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 17/20] t9300: make the stream " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 18/20] t9300: make the get-mark and encoding " Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 19/20] t9300: move self-contained tests into dedicated files Karthik Nayak
2026-11-12 17:34   ` [PATCH v2 20/20] t93xx: drop the series letter from the moved test names Karthik Nayak

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=745fe055-3032-4630-b33f-f215b845782a@gmail.com \
    --to=kaartic.sivaraam@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=karthik.188@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