threads / patch / 58330

patch, 2 partsp0004: fix prereq declaration

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

## tl;dr

4 messages between Aug 19, 2022 and Aug 19, 2022. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Victoria Dye via GitGitGadget· Aug 19, 2022, 20:49 UTC · lore

[PATCH 0/2] t/perf: fix broken tests

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
Victoria Dye via GitGitGadget· Aug 19, 2022, 20:49 UTC · re: Victoria Dye via GitGitGadget · lore
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(-)
Show changes to t/perf/p0004-lazy-init-name-hash.sh +1 −1
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
Junio C Hamano· Aug 19, 2022, 21:33 UTC · re: Victoria Dye via GitGitGadget · lore

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

"Victoria Dye via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 10 quoted lines
> 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.

Show 12 quoted lines
> 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
>  "
Victoria Dye via GitGitGadget· Aug 19, 2022, 20:49 UTC · re: Victoria Dye via GitGitGadget · lore

[PATCH 2/2] p0006: fix 'read-tree' argument ordering

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(-)
Show changes to t/perf/p0006-read-tree-checkout.sh +1 −1
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

← back to recent threads