Skip to content

Commit 1800d7b

Browse files
ambvmgorny
authored andcommitted
[3.11] pythongh-110190: Temporarily skip new test introduced in pythongh-112604 on PPC64LE (pythonGH-112818) (python#112830)
(cherry picked from commit 9f67042) Signed-off-by: Michał Górny <[email protected]>
1 parent e5e74ff commit 1800d7b

File tree

1 file changed

+52
-45
lines changed

1 file changed

+52
-45
lines changed

Lib/ctypes/test/test_structures.py

Lines changed: 52 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -575,51 +575,6 @@ class Test3B(Test3A):
575575
('more_data', c_float * 2),
576576
]
577577

578-
class Test3C1(Structure):
579-
_fields_ = [
580-
("data", c_double * 4)
581-
]
582-
583-
class DataType4(Array):
584-
_type_ = c_double
585-
_length_ = 4
586-
587-
class Test3C2(Structure):
588-
_fields_ = [
589-
("data", DataType4)
590-
]
591-
592-
class Test3C3(Structure):
593-
_fields_ = [
594-
("x", c_double),
595-
("y", c_double),
596-
("z", c_double),
597-
("t", c_double)
598-
]
599-
600-
class Test3D1(Structure):
601-
_fields_ = [
602-
("data", c_double * 5)
603-
]
604-
605-
class DataType5(Array):
606-
_type_ = c_double
607-
_length_ = 5
608-
609-
class Test3D2(Structure):
610-
_fields_ = [
611-
("data", DataType5)
612-
]
613-
614-
class Test3D3(Structure):
615-
_fields_ = [
616-
("x", c_double),
617-
("y", c_double),
618-
("z", c_double),
619-
("t", c_double),
620-
("u", c_double)
621-
]
622-
623578
# Load the shared library
624579
dll = CDLL(_ctypes_test.__file__)
625580

@@ -668,6 +623,58 @@ class Test3D3(Structure):
668623
self.assertAlmostEqual(s.more_data[0], -3.0, places=6)
669624
self.assertAlmostEqual(s.more_data[1], -2.0, places=6)
670625

626+
@unittest.skipIf(
627+
'ppc64le' in platform.uname().machine,
628+
"gh-110190: currently fails on ppc64le",
629+
)
630+
def test_array_in_struct_registers(self):
631+
dll = CDLL(_ctypes_test.__file__)
632+
633+
class Test3C1(Structure):
634+
_fields_ = [
635+
("data", c_double * 4)
636+
]
637+
638+
class DataType4(Array):
639+
_type_ = c_double
640+
_length_ = 4
641+
642+
class Test3C2(Structure):
643+
_fields_ = [
644+
("data", DataType4)
645+
]
646+
647+
class Test3C3(Structure):
648+
_fields_ = [
649+
("x", c_double),
650+
("y", c_double),
651+
("z", c_double),
652+
("t", c_double)
653+
]
654+
655+
class Test3D1(Structure):
656+
_fields_ = [
657+
("data", c_double * 5)
658+
]
659+
660+
class DataType5(Array):
661+
_type_ = c_double
662+
_length_ = 5
663+
664+
class Test3D2(Structure):
665+
_fields_ = [
666+
("data", DataType5)
667+
]
668+
669+
class Test3D3(Structure):
670+
_fields_ = [
671+
("x", c_double),
672+
("y", c_double),
673+
("z", c_double),
674+
("t", c_double),
675+
("u", c_double)
676+
]
677+
671678
# Tests for struct Test3C
672679
expected = (1.0, 2.0, 3.0, 4.0)
673680
func = dll._testfunc_array_in_struct_set_defaults_3C

0 commit comments

Comments
 (0)