# [PATCH 1/2] p0004: fix prereq declaration

4 messages from 2022-08-19 to 2022-08-19. Participants: Victoria Dye via GitGitGadget, Junio C Hamano.
Thread: https://gitlist.dev/t/58330

## Victoria Dye via GitGitGadget, 2022-08-19 20:49

Subject: [PATCH 1/2] p0004: fix prereq declaration
Message-ID: <0e71792a718512089b94c0d5985db7fd8093c6a5.1660942149.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/0e71792a718512089b94c0d5985db7fd8093c6a5.1660942149.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.1330.git.1660942149.gitgitgadget@gmail.com>

```
From: Victoria Dye <vdye@github.com>

Fix multi-threaded 'p0004' test's use of the 'REPO_BIG_ENOUGH_FOR_MULTI'
prerequisite. Unlike normal 't/' tests, 't/perf/' tests need to have their
prerequisites declared with the '--prereq' flag.

Signed-off-by: Victoria Dye <vdye@github.com>
---
 t/perf/p0004-lazy-init-name-hash.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/perf/p0004-lazy-init-name-hash.sh b/t/perf/p0004-lazy-init-name-hash.sh
index 1afc08fe7f1..85be14e4ddb 100755
--- a/t/perf/p0004-lazy-init-name-hash.sh
+++ b/t/perf/p0004-lazy-init-name-hash.sh
@@ -49,7 +49,7 @@ test_perf "single-threaded, $desc" "
 	test-tool lazy-init-name-hash --single --count=$count
 "
 
-test_perf REPO_BIG_ENOUGH_FOR_MULTI "multi-threaded, $desc" "
+test_perf "multi-threaded, $desc" --prereq REPO_BIG_ENOUGH_FOR_MULTI "
 	test-tool lazy-init-name-hash --multi --count=$count
 "
 
-- 
gitgitgadget


```

## Victoria Dye via GitGitGadget, 2022-08-19 20:49

Subject: [PATCH 2/2] p0006: fix 'read-tree' argument ordering
Message-ID: <e79f23a66b28087b8690ff0f604b806babc49cd0.1660942149.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/e79f23a66b28087b8690ff0f604b806babc49cd0.1660942149.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.1330.git.1660942149.gitgitgadget@gmail.com>

```
From: Victoria Dye <vdye@github.com>

In the 'p0006' test "read-tree br_base br_ballast", move the '-n' flag used
in 'git read-tree' ahead of its positional arguments.

Signed-off-by: Victoria Dye <vdye@github.com>
---
 t/perf/p0006-read-tree-checkout.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/perf/p0006-read-tree-checkout.sh b/t/perf/p0006-read-tree-checkout.sh
index 900b385c4bb..c481c012d2f 100755
--- a/t/perf/p0006-read-tree-checkout.sh
+++ b/t/perf/p0006-read-tree-checkout.sh
@@ -46,7 +46,7 @@ test_expect_success "setup repo" '
 '
 
 test_perf "read-tree br_base br_ballast ($nr_files)" '
-	git read-tree -m br_base br_ballast -n
+	git read-tree -n -m br_base br_ballast
 '
 
 test_perf "switch between br_base br_ballast ($nr_files)" '
-- 
gitgitgadget

```

## Victoria Dye via GitGitGadget, 2022-08-19 20:49

Subject: [PATCH 0/2] t/perf: fix broken tests
Message-ID: <pull.1330.git.1660942149.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.1330.git.1660942149.gitgitgadget%40gmail.com

```
This series fixes two performance tests (p0004 & p0006) with syntax issues
preventing them from running properly. Since these are pretty
straightforward syntax bugs, the fixes don't seem to change the intended
behavior of the tests.

Thanks!

 * Victoria

Victoria Dye (2):
  p0004: fix prereq declaration
  p0006: fix 'read-tree' argument ordering

 t/perf/p0004-lazy-init-name-hash.sh | 2 +-
 t/perf/p0006-read-tree-checkout.sh  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


base-commit: 795ea8776befc95ea2becd8020c7a284677b4161
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1330%2Fvdye%2Fbugfix%2Fperf-test-bugs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1330/vdye/bugfix/perf-test-bugs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1330
-- 
gitgitgadget

```

## Junio C Hamano, 2022-08-19 21:33

Subject: Re: [PATCH 1/2] p0004: fix prereq declaration
Message-ID: <xmqqfshrkjeh.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqfshrkjeh.fsf%40gitster.g
In-Reply-To: <0e71792a718512089b94c0d5985db7fd8093c6a5.1660942149.git.gitgitgadget@gmail.com>

```
"Victoria Dye via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Victoria Dye <vdye@github.com>
>
> Fix multi-threaded 'p0004' test's use of the 'REPO_BIG_ENOUGH_FOR_MULTI'
> prerequisite. Unlike normal 't/' tests, 't/perf/' tests need to have their
> prerequisites declared with the '--prereq' flag.
>
> Signed-off-by: Victoria Dye <vdye@github.com>
> ---
>  t/perf/p0004-lazy-init-name-hash.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks.  It is unfortunate that we need to live with this seemingly
unnecessary deviation.

> diff --git a/t/perf/p0004-lazy-init-name-hash.sh b/t/perf/p0004-lazy-init-name-hash.sh
> index 1afc08fe7f1..85be14e4ddb 100755
> --- a/t/perf/p0004-lazy-init-name-hash.sh
> +++ b/t/perf/p0004-lazy-init-name-hash.sh
> @@ -49,7 +49,7 @@ test_perf "single-threaded, $desc" "
>  	test-tool lazy-init-name-hash --single --count=$count
>  "
>  
> -test_perf REPO_BIG_ENOUGH_FOR_MULTI "multi-threaded, $desc" "
> +test_perf "multi-threaded, $desc" --prereq REPO_BIG_ENOUGH_FOR_MULTI "
>  	test-tool lazy-init-name-hash --multi --count=$count
>  "

```
