You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/data/prj/python/src/python3-3.7.0/Lib/test/test_time.py", line 446, in test_mktimeself.assertEqual(time.mktime(tt), t)
OverflowError: mktime argument out of range
Traceback (most recent call last):
File "/opt/lib/python3.7/test/test_time.py", line 446, in test_mktimeself.assertEqual(time.mktime(tt), t)
OverflowError: mktime argument out of range
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 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.
New changeset e2926b7 by Nick Coghlan (Michael Felt) in branch 'master': bpo-34373: fix test_mktime and test_pthread_getcpuclickid tests on AIX (GH-8726) e2926b7
Could this alos be backported to Version 3.7 and 3.6 - thx!
As 3.6 is in security mode - I guess only 3.7 then.
----------
versions: +Python 3.6, Python 3.7
Activity
aixtools commentedon Aug 10, 2018
32-bit:
======================================================================
ERROR: test_mktime (test.test_time.TimeTestCase)
----------------------------------------------------------------------
======================================================================
FAIL: test_pthread_getcpuclockid (test.test_time.TimeTestCase)
----------------------------------------------------------------------
64-bit:
======================================================================
ERROR: test_mktime (test.test_time.TimeTestCase)
----------------------------------------------------------------------
======================================================================
ERROR: test_pthread_getcpuclockid (test.test_time.TimeTestCase)
----------------------------------------------------------------------
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.
aixtools commentedon Aug 31, 2018
Would be very nice to get this to clear on the build bots!
ncoghlan commentedon Dec 28, 2018
New changeset e2926b7 by Nick Coghlan (Michael Felt) in branch 'master':
bpo-34373: fix test_mktime and test_pthread_getcpuclickid tests on AIX (GH-8726)
e2926b7
aixtools commentedon Mar 10, 2019
Could this alos be backported to Version 3.7 and 3.6 - thx!
aixtools commentedon Mar 11, 2019
On 10/03/2019 19:43, Michael Felt wrote:
vstinner commentedon Apr 9, 2019
New changeset 8709490 by Victor Stinner in branch 'master':
bpo-34373: Fix time.mktime() on AIX (GH-12726)
8709490