Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_worker_timeout fails on s390x #366

Open
mcepl opened this issue Nov 16, 2023 · 2 comments
Open

test_worker_timeout fails on s390x #366

mcepl opened this issue Nov 16, 2023 · 2 comments

Comments

@mcepl
Copy link

mcepl commented Nov 16, 2023

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.

@dabeaz
Copy link
Owner

dabeaz commented Nov 17, 2023

No idea. Curio is pure Python although there are a few minor differences to account for the Windows/Unix split.

@mcepl
Copy link
Author

mcepl commented Nov 25, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants