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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CST6CDT and the like are POSIX timezone, with no rule for transition.
And POSIX doesn't enforce how to interpret the rule if it's omited.
Some libc resorted back to IANA (formerly Olson) db rules for those
timezones.  Other libc (e.g. musl) interpret that as no transition at
all [1].

In addition, distributions (notoriously Debian-derived, which uses IANA
db for CST6CDT and the like) started to split "legacy" timezones
like CST6CDT, EST5EDT into `tzdata-legacy', which will not be installed
by default [2].

In those cases, t9604 will run into failure.

Let's switch to POSIX timezone with rules to change timezone.

1: http://mm.icann.org/pipermail/tz/2024-March/058751.html
2: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1043250

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx>
---
* 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
 t/t9604-cvsimport-timestamps.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/t/t9604-cvsimport-timestamps.sh b/t/t9604-cvsimport-timestamps.sh
index 2ff4aa932df44..07560d4779872 100755
--- a/t/t9604-cvsimport-timestamps.sh
+++ b/t/t9604-cvsimport-timestamps.sh
@@ -5,9 +5,10 @@ test_description='git cvsimport timestamps'
 
 setup_cvs_test_repository t9604
 
-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 &&
@@ -38,9 +39,9 @@ test_expect_success PERL 'check timestamps with author-specific timezones' '
 
 	cat >cvs-authors <<-EOF &&
 	user1=User One <user1@xxxxxxxxxx>
-	user2=User Two <user2@xxxxxxxxxx> CST6CDT
-	user3=User Three <user3@xxxxxxxxxx> EST5EDT
-	user4=User Four <user4@xxxxxxxxxx> MST7MDT
+	user2=User Two <user2@xxxxxxxxxx> CST6CDT,M4.1.0,M10.5.0
+	user3=User Three <user3@xxxxxxxxxx> EST5EDT,M4.1.0,M10.5.0
+	user4=User Four <user4@xxxxxxxxxx> MST7MDT,M4.1.0,M10.5.0
 	EOF
 	git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
 	(
-- 
2.44.0.rc0.258.g7320e9588666f





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux