Skip to content

Commit 3d6bab6

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 7a77907 commit 3d6bab6

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
@@ -570,51 +570,6 @@ class Test3B(Test3A):
570570
('more_data', c_float * 2),
571571
]
572572

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

@@ -663,6 +618,58 @@ class Test3D3(Structure):
663618
self.assertAlmostEqual(s.more_data[0], -3.0, places=6)
664619
self.assertAlmostEqual(s.more_data[1], -2.0, places=6)
665620

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

0 commit comments

Comments
 (0)