# Re: \[PATCH 8/8\] t/test-lib: make feature-testbed job more accessible

- From: Patrick Steinhardt \<hidden\>
- Date: 2026-10-28 07:41:34 
- List: git
- Page: https://ratatoskr.run/git/2026/10/17815258
- Thread: https://ratatoskr.run/git/2026/10/17808918/t.md

```text
On Tue, Oct 27, 2026 at 01:59:31PM -0700, Junio C Hamano wrote:
> Phillip Wood [ref] writes:
> 
> > That all sounds sensible, the commit message could maybe flag that the 
> > "feature-testbed" also sets OPENSSL_SHA1_UNSAFE which 
> > "--feature-testbed" does not because it is only concerned with GIT_TEST_*.
> >
> >> diff --git a/t/test-lib.sh b/t/test-lib.sh
> >> index de566309861..8863bcac930 100644
> >> --- a/t/test-lib.sh
> >> +++ b/t/test-lib.sh
> >> @@ -202,6 +202,14 @@ finalize_test_case_output () { :; }
> >>   finalize_test_leak_output () { :; }
> >>   finalize_test_output () { :; }
> >>   
> >> +set_default_env () {
> >> +	if eval "test -z \"\${$1+set}\""
> >
> > This made me scratch my head for a couple of minutes, but I think it is 
> > correct
> >
> > 	set_default_env ABC 1
> >
> > evaluates
> >
> > 	test -z "${ABC+set}"
> >
> > to see if $ABC is unset.
> >
> > Thanks
> >
> > Phillip
> >> +	then
> >> +		eval "$1=\$2"
> 
> This one may want to quote the right hand side to be more widely
> portable, i.e., eval "$1=\"\$2\"" or something along that line.
> POSIX Bourne shell does not require the right hand side 
> 
>     VARIABLE=$VAR
> 
> to be quoted, but CodingGuidelines has observed some buggy shells.
> It may be better to be extra clear than sorry.

Fair. I've queued this change locally for now, but will wait for the
discussion to figure out whether I'll keep this change in the first
place.

Thanks!

Patrick
```
