This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v4] Fix strptime era handling, add more era tests [BZ #24394]


On 3/29/19 2:50 AM, TAMUKI Shoichi wrote:
Hello DJ Delorie-san,

Thank you for creating this test case.

From: DJ Delorie <dj@redhat.com>
Subject: [v4] Fix strptime era handling, add more era tests [BZ #24394]
Date: Thu, 28 Mar 2019 23:35:31 -0400

diff --git a/ChangeLog b/ChangeLog
index bd76c1e28d..db33d8a6a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-03-28  DJ Delorie  <dj@redhat.com>
+
+	[BZ #24394]
+	* time/strptime_l.c (%Ey): Fix fencepost error.
+	* time/tst-strftime3.c: New.
+	* time/Makefile (tests): Add tst-strftime3.

This test case is intended to check whether strptime can correctly
parse %EY, so it would be nice to rename it to tst-strptime4.c.

Agreed. Good catch.

The test case to check whether strftime can correctly format %EY
already exists as tst-strftime2.c.  This covers ja_JP, lo_LA, th_TH,
zh_TW, cmn_TW, hak_TW, nan_TW, and lzh_TW.  Regarding *_TW, Rafal-san
is preparing a patch.

The *most important* thing for me is that ja_JP get coverage of the
possible interface uses for the upcoming era name change.

I suggest we focus *only* on ja_JP locale today, and get the new test
in place to test the April 1st new era name change.

In addition to ja_JP locale, I think it is necessary to check the
locale of other countries, in particular *_TW locale.

Agreed. We can add these later.
What about the consideration of %EY, %_EY, and %-EY?

Agreed. We can add these later.

For now I think testing %EY is the single most useful thing, and I
think we could accept the patch just for that.

How does it behave if specifying a non-existent date, such as:

Heisei gan nen 01 gatsu 07 nichi
Showa   64 nen 01 gatsu 08 nichi

I think that these tests are also necessary.

As Rafal points out I think we could use your help there. If we
accept DJ's patch then you could work on top of that to add a few
more test cases to check invalid tests?

Again, I'm keen to get DJ's test clean and working for the era
name change to test the transition points.

--
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]