[PATCH v3] tst: Provide Y2038 tests for mktime (tst-mktime4.c)
Florian Weimer
fweimer@redhat.com
Mon Feb 8 09:15:32 GMT 2021
* Lukasz Majewski:
>> > +static
>> > +void test_mktime_helper (struct tm *tm, long long int exp_val)
>> > +{
>> > + time_t result = mktime (tm);
>> > + if (result == (time_t) -1)
>> > + FAIL_EXIT1 ("*** mktime failed: %m");
>> > +
>> > + TEST_COMPARE ((long long int) result, exp_val);
>> > +}
>>
>> You could add a __LINE__ argument to make it clearer which subtest
>> failed.
>
> Ok, I will replace TEST_COMPARE with if and FAIL_EXIT1() macro with
> __LINE__.
Just to be clear, __LINE__ needs to be passed to test_mktime_helper.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
More information about the Libc-alpha
mailing list