Skip to content

test_worker_timeout fails on s390x #366

@mcepl

Description

@mcepl

When running the test suite while packaging for openSUSE, I get this test failing:

[  155s] =================================== FAILURES ===================================
[  155s] ______________________ test_worker_timeout[run_in_thread] ______________________
[  155s] 
[  155s] kernel = <curio.kernel.Kernel object at 0x3ff8675bd10>
[  155s] runner = <function run_in_thread at 0x3ff84bcd1c0>
[  155s] 
[  155s]     @pytest.mark.parametrize('runner', [run_in_thread, run_in_process])
[  155s]     def test_worker_timeout(kernel, runner):
[  155s]         results = []
[  155s]     
[  155s]         async def spin(n):
[  155s]             while n > 0:
[  155s]                 results.append(n)
[  155s]                 await sleep(0.1)
[  155s]                 n -= 1
[  155s]     
[  155s]         async def blocking(n):
[  155s]             try:
[  155s]                 result = await timeout_after(0.55, runner(time.sleep, n))
[  155s]             except TaskTimeout:
[  155s]                 results.append('cancel')
[  155s]     
[  155s]         async def main():
[  155s]             async with TaskGroup() as g:
[  155s]                 await g.spawn(spin, 10)
[  155s]                 await g.spawn(blocking, 5)
[  155s]     
[  155s]         kernel.run(main())
[  155s]     
[  155s] >       assert results == [
[  155s]             10, 9, 8, 7, 6, 5, 'cancel', 4, 3, 2, 1
[  155s]         ]
[  155s] E       AssertionError: assert [10, 9, 8, 7, 6, 'cancel', 5, 4, 3, 2, 1] == [10, 9, 8, 7, 6, 5, 'cancel', 4, 3, 2, 1]
[  155s] E         At index 5 diff: 'cancel' != 5
[  155s] E         Full diff:
[  155s] E         - [10, 9, 8, 7, 6, 5, 'cancel', 4, 3, 2, 1]
[  155s] E         ?                 ---
[  155s] E         + [10, 9, 8, 7, 6, 'cancel', 5, 4, 3, 2, 1]
[  155s] E         ?                            +++
[  155s] 
[  155s] tests/test_workers.py:143: AssertionError

I thought that curio is pure Python, so big endian/little endian issues (which is 90% of all such s390x-only bugs) should not affect it?

Complete build log with all packages used and steps taken to reproduce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions