* [PATCH] t6300: fix setup with GPGSSH but without GPG
@ 2023-07-16 8:17 René Scharfe
2023-07-17 6:33 ` Christian Couder
2023-07-17 16:22 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: René Scharfe @ 2023-07-16 8:17 UTC (permalink / raw)
To: Git List
Cc: Kousik Sanagavarapu, Hariom Verma, Jaydeep Das,
Nsengiyumva Wilberforce, Christian Couder
In a test introduced by 26c9c03f0a (ref-filter: add new "signature"
atom, 2023-06-04) the file named "file" is added by a setup step that
requires GPG and modified by a second setup step that requires GPGSSH.
Systems lacking the first prerequisite skip the initial setup step and
then "git commit -a" in the second one doesn't find the modified file.
Add it explicitly.
Signed-off-by: René Scharfe <l.s.r@web.de>
---
t/t6300-for-each-ref.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 6e6ec852b5..1180c3254c 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -1584,7 +1584,8 @@ test_expect_success GPGSSH 'setup for signature atom using ssh' '
test_config user.signingkey "${GPGSSH_KEY_PRIMARY}" &&
echo "8" >file &&
test_tick &&
- git commit -a -S -m "file: 8" &&
+ git add file &&
+ git commit -S -m "file: 8" &&
git tag eighth-signed-ssh
'
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] t6300: fix setup with GPGSSH but without GPG
2023-07-16 8:17 [PATCH] t6300: fix setup with GPGSSH but without GPG René Scharfe
@ 2023-07-17 6:33 ` Christian Couder
2023-07-17 16:22 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Christian Couder @ 2023-07-17 6:33 UTC (permalink / raw)
To: René Scharfe
Cc: Git List, Kousik Sanagavarapu, Hariom Verma, Jaydeep Das,
Nsengiyumva Wilberforce
On Sun, Jul 16, 2023 at 10:17 AM René Scharfe <l.s.r@web.de> wrote:
>
> In a test introduced by 26c9c03f0a (ref-filter: add new "signature"
> atom, 2023-06-04) the file named "file" is added by a setup step that
> requires GPG and modified by a second setup step that requires GPGSSH.
> Systems lacking the first prerequisite skip the initial setup step and
> then "git commit -a" in the second one doesn't find the modified file.
> Add it explicitly.
Right, acked!
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] t6300: fix setup with GPGSSH but without GPG
2023-07-16 8:17 [PATCH] t6300: fix setup with GPGSSH but without GPG René Scharfe
2023-07-17 6:33 ` Christian Couder
@ 2023-07-17 16:22 ` Junio C Hamano
2023-07-17 17:12 ` René Scharfe
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2023-07-17 16:22 UTC (permalink / raw)
To: René Scharfe
Cc: Git List, Kousik Sanagavarapu, Hariom Verma, Jaydeep Das,
Nsengiyumva Wilberforce, Christian Couder
René Scharfe <l.s.r@web.de> writes:
> In a test introduced by 26c9c03f0a (ref-filter: add new "signature"
> atom, 2023-06-04) the file named "file" is added by a setup step that
> requires GPG and modified by a second setup step that requires GPGSSH.
> Systems lacking the first prerequisite skip the initial setup step and
> then "git commit -a" in the second one doesn't find the modified file.
> Add it explicitly.
>
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
> t/t6300-for-each-ref.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Thanks for good eyes.
I guess a box without GPG is not so uncommon, and even such a box
can reasonably be expected to have SSH on it, so I would believe if
this was discovered on a real development box, but is that how you
found this? Or have you invented a nice test helper that lets you
pick random set of prerequisites and try permutations of having and
not having them, or something nice like that?
Will queue.
> diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
> index 6e6ec852b5..1180c3254c 100755
> --- a/t/t6300-for-each-ref.sh
> +++ b/t/t6300-for-each-ref.sh
> @@ -1584,7 +1584,8 @@ test_expect_success GPGSSH 'setup for signature atom using ssh' '
> test_config user.signingkey "${GPGSSH_KEY_PRIMARY}" &&
> echo "8" >file &&
> test_tick &&
> - git commit -a -S -m "file: 8" &&
> + git add file &&
> + git commit -S -m "file: 8" &&
> git tag eighth-signed-ssh
> '
>
> --
> 2.41.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] t6300: fix setup with GPGSSH but without GPG
2023-07-17 16:22 ` Junio C Hamano
@ 2023-07-17 17:12 ` René Scharfe
0 siblings, 0 replies; 4+ messages in thread
From: René Scharfe @ 2023-07-17 17:12 UTC (permalink / raw)
To: Junio C Hamano
Cc: Git List, Kousik Sanagavarapu, Hariom Verma, Jaydeep Das,
Nsengiyumva Wilberforce, Christian Couder
Am 17.07.23 um 18:22 schrieb Junio C Hamano:
> René Scharfe <l.s.r@web.de> writes:
>
>> In a test introduced by 26c9c03f0a (ref-filter: add new "signature"
>> atom, 2023-06-04) the file named "file" is added by a setup step that
>> requires GPG and modified by a second setup step that requires GPGSSH.
>> Systems lacking the first prerequisite skip the initial setup step and
>> then "git commit -a" in the second one doesn't find the modified file.
>> Add it explicitly.
>>
>> Signed-off-by: René Scharfe <l.s.r@web.de>
>> ---
>> t/t6300-for-each-ref.sh | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Thanks for good eyes.
>
> I guess a box without GPG is not so uncommon, and even such a box
> can reasonably be expected to have SSH on it, so I would believe if
> this was discovered on a real development box, but is that how you
> found this? Or have you invented a nice test helper that lets you
> pick random set of prerequisites and try permutations of having and
> not having them, or something nice like that?
The test actually did fail on my machine.
Running tests with all possible permutations of prerequisites would be
nice, but sounds very expensive -- there must be billions of them! But
there are only a few per test script, I imagine. Collecting all found
prerequisites for each script and providing a way to force-disable them
individually could make testing them all feasible. Nice idea!
René
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-17 17:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-16 8:17 [PATCH] t6300: fix setup with GPGSSH but without GPG René Scharfe
2023-07-17 6:33 ` Christian Couder
2023-07-17 16:22 ` Junio C Hamano
2023-07-17 17:12 ` René Scharfe
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).