[PATCH] tst: Provide Y2038 tests for mktime (tst-mktime4.c)

Paul Eggert eggert@cs.ucla.edu
Mon Jan 25 19:22:05 GMT 2021


On 1/25/21 5:03 AM, Lukasz Majewski wrote:

> +  /* Set time zone for the test.  */
> +  TEST_VERIFY_EXIT (setenv ("TZ", "Europe/Warsaw", 1) == 0);
> +  tzset ();

Your test data assume UTC, so why set the time zone to Warsaw's?

Also, there's no need to call tzset; mktime is supposed to do that.

I suggest also testing 2**32 - 1 and 2**32, when using 64-bit time_t.


More information about the Libc-alpha mailing list