Bug 15783 - AB-INT PTEST: python3 test_extractall_none_mtime
Summary: AB-INT PTEST: python3 test_extractall_none_mtime
Status: IN PROGRESS REVIEW
Alias: None
Product: Package Testing (ptest)
Classification: QA/Testing
Component: ptest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 6.2
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard: AB-INT
Depends on:
Blocks:
 
Reported: 2025-03-05 14:41 UTC by João Marcos Costa
Modified: 2026-11-19 17:14 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
logs (106.92 KB, text/plain)
2025-03-05 14:41 UTC, João Marcos Costa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description João Marcos Costa 2025-03-05 14:41:55 UTC
Created attachment 5105 [details]
logs

https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/583/steps/12/logs/stdio

Failed ptests:{'python3': ['test_extractall_none_mtime', 'python3']}

qemuarm64-ptest ubuntu2410-vk-arm1
Comment 1 Ross Burton 2025-03-06 15:49:52 UTC
FAIL: test_extractall_none_mtime (test.test_tarfile.NoneInfoExtractTests_Tar.test_extractall_none_mtime) (path=PosixPath('/var/volatile/tmp/test_python_0yxmmpt7/test_python_16329æ/@test_16329_tmpæ-tardir/extractall_none/pax/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123'))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.13/test/test_tarfile.py", line 3270, in test_extractall_none_mtime
    self.assertGreaterEqual(path.stat().st_mtime, now)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 1734189417.9550788 not greater than or equal to 1734193017.9396935
Comment 2 Ross Burton 2025-03-06 16:33:42 UTC
So... the parent folder was created _after_ the files inside it. Great.

But the difference between them is 3599.9846147 seconds, or (almost) exactly one hour.  That probably means something important.
Comment 3 Randy MacLeod 2026-04-08 21:30:14 UTC
The odd timestamps are interesting but this only occurred once and 
hasn't happened in a year so resolving.
Comment 4 Mathieu Dubois-Briand 2026-06-10 16:42:15 UTC
qemux86-64-musl-ptest debian12-vk-4 mathieu/master-next completed at 2026-06-09 08:48:21+00:00
https://valkyrie.yocto.io/pub/non-release/20260609-56/testresults/qemux86-64-musl-ptest/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/505/steps/13/logs/stdio
Comment 5 Mathieu Dubois-Briand 2026-06-15 09:02:48 UTC
qemux86-64-musl-ptest debian12-vk-6 master&master-next completed at 2026-06-13 18:24:13+00:00
https://valkyrie.yocto.io/pub/non-release/20260613-102/testresults/qemux86-64-musl-ptest/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/536/steps/13/logs/stdio
Comment 6 João Marcos Costa 2026-11-16 09:10:58 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4909/steps/15/logs/stdio

qemuarm64-ptest ubuntu2404-vk-arm2

Reopening.
Comment 7 Ross Burton 2026-11-19 16:09:15 UTC
FAIL: test_extractall_none_mtime (test.test_tarfile.NoneInfoExtractTests_Data.test_extractall_none_mtime) (path=PosixPath('/var/volatile/tmp/test_python_0
c2fdsmi/test_python_17795√¶/@test_17795_tmp√¶-tardir/extractall_none/gnu/123/123/123/123/123'))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.14/test/test_tarfile.py", line 3581, in test_extractall_none_mtime
    self.assertGreaterEqual(path.stat().st_mtime, now)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 1794589993.9077852 not greater than or equal to 1794593593.9003344
Comment 8 Ross Burton 2026-11-19 16:13:23 UTC
1794593593.9003344-1794589993.9077852=3599.9925492

Ah hour, again.

I'm wondering if there's a test running in parallel that changes the time!
Comment 9 Ross Burton 2026-11-19 16:15:26 UTC
Look what I found:

    def test_monotonic_settime(self):
        t1 = time.monotonic()
        realtime = time.clock_gettime(time.CLOCK_REALTIME)
        # jump backward with an offset of 1 hour
        try:
            time.clock_settime(time.CLOCK_REALTIME, realtime - 3600)
Comment 10 Ross Burton 2026-11-19 16:34:00 UTC
Filed https://github.com/python/cpython/issues/162280 about the general issue of changing system time during a test run.  We can skip that test, I hope that's the only instance.
Comment 11 Ross Burton 2026-11-19 17:14:58 UTC
"python3: skip test_monotonic_settime() test case" posted.