All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t9604: Fix test for musl libc and new Debian
Date: Sun, 7 Apr 2024 08:38:10 +0700	[thread overview]
Message-ID: <ZhH5Aoc1WPKRYtpj@danh.dev> (raw)
In-Reply-To: <xmqqsezylmh9.fsf@gitster.g>

On 2024-04-06 05:11:30-0700, Junio C Hamano <gitster@pobox.com> wrote:
> Đoàn Trần Công Danh <congdanhqx@gmail.com> 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.

The notation can be found in OpenWRT because Olson db takes spaces
(and update).

> How confident are you that it is widely supported?

To be honest, I'm not sure.  I know that Linux musl, glibc, uClibc,
all BSDs, and Darwin supports that.
I also think System V SVR4 supports that notation [1], and
its successors (HP-UX [2], Solaris [3], UnixWare [1], AIX [4]) seems to supports it.

1: https://mm.icann.org/pipermail/tz/1994-May/009304.html
2: HP-UX is conformed to UNIX-03, its support should be there
   https://www.opengroup.org/openbrand/register/xy.htm
3: For Solaris, at least Fujitsu SPARC supports POSIX timezone
   https://jp.fujitsu.com/platform/server/sparc/manual/en/c120-e679/3.6.5.html
4: https://www.ibm.com/support/pages/managing-time-zone-variable-posix 

Those companies seem to claim their product supports POSIX timezone:
- SCO Unix: http://osr600doc.sco.com/en/man/html.M/environ.M.html
- QNX: https://www.qnx.com/developers/docs/8.0/com.qnx.doc.neutrino.user_guide/topic/environment_TimeZone.html

From those webpages, I think those OS also support POSIX timezone
notation:
- OSF/1 and Tru64 https://www.unix.com/man-page/osf1/3/tzname/
- IRIX: https://nixdoc.net/man-pages/IRIX/man5/environ.5.html
- Interix: https://ftp.zx.net.nz/pub/archive/ftp.microsoft.com/MISC/KB/en-us/246/420.HTM
- Minix: https://www.unix.com/man-page/minix/5/tz/

I don't know about NonStop, z/OS and OS/390, but I think our list has
people who actively working on them. May we ask them to confirm?

> 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?

Well, when I tried to make this change, I first started with Olson
notation. Then I dig into the mail archive, and I see that we don't
want to depends on IANA db [5].  Then I switch to POSIX notation but
I forgot to update that.  I think a PREREQ would work better?

5: https://lore.kernel.org/git/7v4nlvulc2.fsf@alter.siamese.dyndns.org/

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

-- 
Danh

  reply	other threads:[~2024-04-07  1:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-06  3:29 [PATCH] t9604: Fix test for musl libc and new Debian Đoàn Trần Công Danh
2024-04-06 12:11 ` Junio C Hamano
2024-04-07  1:38   ` Đoàn Trần Công Danh [this message]
2024-04-08 17:34     ` Junio C Hamano
2024-04-07  1:33 ` Jeff King
2024-04-07  1:45   ` Đoàn Trần Công Danh
2024-04-07  1:50     ` Đoàn Trần Công Danh
2024-04-10  3:28 ` [PATCH v2] " Đoàn Trần Công Danh
2024-04-10  3:29   ` Eric Sunshine
2024-04-10  3:35   ` Đoàn Trần Công Danh
2024-04-10  3:37   ` Eric Sunshine
2024-04-10  7:10     ` Đoàn Trần Công Danh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZhH5Aoc1WPKRYtpj@danh.dev \
    --to=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.