Skip to content

Commit a9107fe

Browse files
authored
gh-117755: Skip test_io.test_constructor() on s390x (#117801)
The test allocates 9 223 372 036 854 775 807 bytes (0x7fffffffffffffff) and mimalloc fails with a division by zero on s390x.
1 parent 7bcc257 commit a9107fe

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Lib/test/test_io.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
from test.support.script_helper import (
4141
assert_python_ok, assert_python_failure, run_python_until_end)
4242
from test.support import (
43-
import_helper, is_apple, os_helper, skip_if_sanitizer, threading_helper, warnings_helper
43+
import_helper, is_apple, os_helper, skip_if_sanitizer, threading_helper, warnings_helper,
44+
skip_on_s390x
4445
)
4546
from test.support.os_helper import FakePath
4647

@@ -1700,6 +1701,9 @@ class CBufferedReaderTest(BufferedReaderTest, SizeofTest):
17001701
@skip_if_sanitizer(memory=True, address=True, thread=True,
17011702
reason="sanitizer defaults to crashing "
17021703
"instead of returning NULL for malloc failure.")
1704+
# gh-117755: The test allocates 9 223 372 036 854 775 807 bytes
1705+
# (0x7fffffffffffffff) and mimalloc fails with a division by zero on s390x.
1706+
@skip_on_s390x
17031707
def test_constructor(self):
17041708
BufferedReaderTest.test_constructor(self)
17051709
# The allocation can succeed on 32-bit builds, e.g. with more
@@ -2068,6 +2072,9 @@ class CBufferedWriterTest(BufferedWriterTest, SizeofTest):
20682072
@skip_if_sanitizer(memory=True, address=True, thread=True,
20692073
reason="sanitizer defaults to crashing "
20702074
"instead of returning NULL for malloc failure.")
2075+
# gh-117755: The test allocates 9 223 372 036 854 775 807 bytes
2076+
# (0x7fffffffffffffff) and mimalloc fails with a division by zero on s390x.
2077+
@skip_on_s390x
20712078
def test_constructor(self):
20722079
BufferedWriterTest.test_constructor(self)
20732080
# The allocation can succeed on 32-bit builds, e.g. with more
@@ -2590,6 +2597,9 @@ class CBufferedRandomTest(BufferedRandomTest, SizeofTest):
25902597
@skip_if_sanitizer(memory=True, address=True, thread=True,
25912598
reason="sanitizer defaults to crashing "
25922599
"instead of returning NULL for malloc failure.")
2600+
# gh-117755: The test allocates 9 223 372 036 854 775 807 bytes
2601+
# (0x7fffffffffffffff) and mimalloc fails with a division by zero on s390x.
2602+
@skip_on_s390x
25932603
def test_constructor(self):
25942604
BufferedRandomTest.test_constructor(self)
25952605
# The allocation can succeed on 32-bit builds, e.g. with more

0 commit comments

Comments
 (0)