glibc/time
TAMUKI Shoichi 2f1d61552d time/tst-strftime2.c: Make the file easier to maintain
Express the years as full Gregorian years (e.g., 1988 instead of 88)
and months with natural numbers (1-12 rather than 0-11).

Compare actual dates rather than indexes when selecting the era name.

Declare the local variable era as a string character pointer rather
than an array of chars where the actual string is copied which might
lead to potential buffer overflows in future.

Co-authored-by: Rafal Luzynski <digitalfreak@lingonborough.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>

ChangeLog:

	* time/tst-strftime2.c (date_t): Explicitly define the type.
	(dates): Use natural month and year numbers to express a date.
	(is_before): New function to compare dates.
	(mkreftable): Minor improvements to simplify maintenance.
	(do_test): Reflect the changes in dates array.
2019-04-02 16:37:03 +09:00
..
bits/types Use _STRUCT_TIMESPEC as guard in <bits/types/struct_timespec.h> [BZ #23349] 2018-06-28 13:12:16 +02:00
sys Break some lines before not after operators. 2019-02-22 01:32:36 +00:00
adjtime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
alt_digit.c Break some lines before not after operators. 2019-02-22 01:32:36 +00:00
asctime.c Break some lines before not after operators. 2019-02-22 01:32:36 +00:00
bug-asctime_r.c [BZ #1468] 2005-10-14 17:20:58 +00:00
bug-asctime.c
bug-getdate1.c support: Introduce new subdirectory for test infrastructure 2016-12-09 08:18:27 +01:00
bug-mktime1.c
bug-mktime4.c mktime: new test for mktime failure 2018-11-15 22:59:33 +01:00
clock.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
clocktest.c Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
ctime_r.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ctime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
datemsk * time/Makefile (tst-getdate-ENV): Add TZDIR to environment. 2001-07-18 09:43:36 +00:00
Depend
difftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dysize.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
era.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getdate.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getitimer.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
gettimeofday.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
gmtime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
lc-time-cleanup.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
localtime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Makefile Fix strptime era handling, add more strftime tests [BZ #24394] 2019-04-01 14:19:16 -04:00
mktime-internal.h Fix mktime localtime offset confusion 2018-09-19 17:09:08 -07:00
mktime.c * time/mktime.c: Update obsolete URL in comment. 2019-03-17 16:26:07 -07:00
offtime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setitimer.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
settimeofday.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
stime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strftime_l.c Fix a few whitespace arrangement inconsistencies in time/strftime_l.c 2019-02-11 12:13:55 +09:00
strftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strptime_l.c Fix strptime era handling, add more strftime tests [BZ #24394] 2019-04-01 14:19:16 -04:00
strptime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
test_time.c Add some spaces before '('. 2019-02-27 13:55:45 +00:00
time.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
time.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
timegm.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
timespec_get.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst_wcsftime.c Update. 1999-06-16 22:55:47 +00:00
tst-ftime_l.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-ftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-getdate.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-mktime2.c time/tst-mktime2: Improve test error reporting 2018-10-23 11:25:05 +02:00
tst-mktime3.c
tst-mktime.c
tst-posixtz.c Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
tst-strftime2.c time/tst-strftime2.c: Make the file easier to maintain 2019-04-02 16:37:03 +09:00
tst-strftime3.c Fix strptime era handling, add more strftime tests [BZ #24394] 2019-04-01 14:19:16 -04:00
tst-strftime.c Fix BZ #18985 -- out of range data to strftime() causes a segfault 2015-09-26 13:27:48 -07:00
tst-strptime2.c Split DIAG_* macros to new header libc-diag.h. 2017-02-25 09:59:46 -05:00
tst-strptime3.c time: ensure failing strptime() tests are reported correctly 2015-03-06 06:06:26 -05:00
tst-strptime-whitespace.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-strptime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-tzname.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-y2039.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tzfile.c Break more lines before not after operators. 2019-02-25 13:19:19 +00:00
tzset.c time: Use int, not long int, for internal GMT offsets 2019-02-03 09:55:41 +01:00
Versions
wcsftime_l.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
wcsftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00