curio
curio copied to clipboard
test_worker_timeout fails on s390x
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.
No idea. Curio is pure Python although there are a few minor differences to account for the Windows/Unix split.
On Fri Nov 17, 2023 at 12:52 PM CET, David Beazley wrote:
No idea. Curio is pure Python although there are a few minor differences to account for the Windows/Unix split.
I saw it is around the code deals with some bytestrings … is there some in fact binary material which can be influenced by endinnaness?
Best,
Matěj
-- http://matej.ceplovi.cz/blog/, @@.*** GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
Though boys throw stones at frogs in sport, the frogs do not die in sport but in earnest. -- Bion of Borysthenes as quoted by Plutarch