Subject: Re: [PATCH] t9604: Fix test for musl libc and new Debian

From: Junio C Hamano <[email-masked]>
Date: Sat, 06 Apr 2024 05:11:30 -0700

Đoàn Trần Công Danh <[email-masked]> writes:

> * Note that since our tests are pre-2007, I use the old rules in the timezone.
> * We can also use IANA notations, which I believe is better, but that mean we
>   will depends on IANA db

I know of the ",start[/time],end[/time]" thing tucked after the
zonename, but haven't seen it used in real life.  How confident are
you that it is widely supported?  I do understand that you saw these
current tests do fail on some platforms, but we'd want to make sure
that we are not breaking other platforms by switching.

> -test_expect_success PERL 'check timestamps are UTC (TZ=CST6CDT)' '
> +test_expect_success PERL 'check timestamps are UTC (TZ=America/Chicago)' '
>  
> -	TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
> +	TZ=CST6CDT,M4.1.0,M10.5.0 \
> +	git cvsimport -p"-x" -C module-1 module &&
>  	git cvsimport -p"-x" -C module-1 module &&
>  	(
>  		cd module-1 &&

A few things curious about this hunk.

 - The test title says America/Chicago but that timezone is never
   used.  Would it make sense to actually use it for tests?

 - If not, shouldn't we at least use the actual timezone we use for
   tests?

 - Do we really want to run cvsimport twice?

> @@ -38,9 +39,9 @@ test_expect_success PERL 'check timestamps with author-specific timezones' '
>  
>  	cat >cvs-authors <<-EOF &&
>  	user1=User One <[email-masked]>
> -	user2=User Two <[email-masked]> CST6CDT
> -	user3=User Three <[email-masked]> EST5EDT
> -	user4=User Four <[email-masked]> MST7MDT
> +	user2=User Two <[email-masked]> CST6CDT,M4.1.0,M10.5.0
> +	user3=User Three <[email-masked]> EST5EDT,M4.1.0,M10.5.0
> +	user4=User Four <[email-masked]> MST7MDT,M4.1.0,M10.5.0
>  	EOF
>  	git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
>  	(