Message323372
32-bit:
======================================================================
ERROR: test_mktime (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/data/prj/python/src/python3-3.7.0/Lib/test/test_time.py", line 446, in test_mktime
self.assertEqual(time.mktime(tt), t)
OverflowError: mktime argument out of range
======================================================================
FAIL: test_pthread_getcpuclockid (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/data/prj/python/src/python3-3.7.0/Lib/test/test_time.py", line 129, in test_pthread_getcpuclockid
self.assertNotEqual(clk_id, time.CLOCK_THREAD_CPUTIME_ID)
AssertionError: 12 == 12
----------------------------------------------------------------------
64-bit:
======================================================================
ERROR: test_mktime (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/lib/python3.7/test/test_time.py", line 446, in test_mktime
self.assertEqual(time.mktime(tt), t)
OverflowError: mktime argument out of range
======================================================================
ERROR: test_pthread_getcpuclockid (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/lib/python3.7/test/test_time.py", line 130, in test_pthread_getcpuclockid
t1 = time.clock_gettime(clk_id)
OverflowError: signed integer is greater than maximum
The test_mktime failed because
time.mktime(time.localtime(-2)) -- actually any negative value in localtime - fails
The patch in the file Modules/timemodule.c fixes this.
The test_pthread_getcpuclockid is a bit more complex as the result is different
depending on 32 or 64-bit mode.
In 32-bit mode AIX always responds with the constant CLOCK_THREAD_CPUTIME_ID.
The patch in Lib/test/test_time.py makes the test aware of this.
In AIX clockid_t is actually long long. However, changing the type to parse to "L"
broke many other things. It seems to work as a long ("l") when the ABI is 64-bit.
See additional change in Modules/timemodule.c
static PyObject *
time_clock_gettime
Finally,
added some (additional) range checking for
_PyTime_localtime for AIX. Not having this complicated testing for above. |
|
Date |
User |
Action |
Args |
2018-08-10 16:15:51 | Michael.Felt | set | recipients:
+ Michael.Felt |
2018-08-10 16:15:51 | Michael.Felt | set | messageid: <1533917751.88.0.56676864532.issue34373@psf.upfronthosting.co.za> |
2018-08-10 16:15:51 | Michael.Felt | link | issue34373 messages |
2018-08-10 16:15:51 | Michael.Felt | create | |
|