[tz] tzcode test suite
eggert at cs.ucla.edu
Mon Jan 18 07:55:45 UTC 2016
Steve Summit wrote:
> quick_timegm takes no such pains,
> because (a) that makes the code simpler and more obviously
> correct, and (b) it doesn't need to. The intent is that the
> "exhaustive" tests are not to be run right out to the edges of
> time_t's range.
I don't see how we can take that luxury. The inputs to run_exhaustive can be
specified by the users, who should be able to put whatever they like as the
ranges. I'd rather not have testsuite.c have overflow bugs that mess up the
results, as the false alarms will be a hassle.
It shouldn't be that hard for testsuite.c to either (1) do the right thing, as
the mainline code does, or (2) check each questionable integer addition and
subtraction and multiplication, and if it overflows then report an error and exit.
I take your point that testsuite.c shouldn't rely on the mainline timegm to
convert times to gmt.
More information about the tz