summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2023-12-08 11:47:32 (GMT)
committerGitHub <noreply@github.com>2023-12-08 11:47:32 (GMT)
commit1e6d36da1eb8ad050e16191e832d731fe10fe5f2 (patch)
tree3cf2cb7e0544f060ecef748338e864c12b517f9b
parent1eac0aab859516378b64552b44b543a0dfd373c2 (diff)
downloadcpython-1e6d36da1eb8ad050e16191e832d731fe10fe5f2.zip
cpython-1e6d36da1eb8ad050e16191e832d731fe10fe5f2.tar.gz
cpython-1e6d36da1eb8ad050e16191e832d731fe10fe5f2.tar.bz2
[3.11] gh-110190: Temporarily skip new test introduced in gh-112604 on PPC64LE (GH-112818) (#112830)
(cherry picked from commit 9f67042f28bf886a9bf30fed6795d26cff255f1e)
-rw-r--r--Lib/ctypes/test/test_structures.py97
1 files changed, 52 insertions, 45 deletions
diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py
index 972ff87..f57bb2b 100644
--- a/Lib/ctypes/test/test_structures.py
+++ b/Lib/ctypes/test/test_structures.py
@@ -503,51 +503,6 @@ class StructureTestCase(unittest.TestCase):
('more_data', c_float * 2),
]
- class Test3C1(Structure):
- _fields_ = [
- ("data", c_double * 4)
- ]
-
- class DataType4(Array):
- _type_ = c_double
- _length_ = 4
-
- class Test3C2(Structure):
- _fields_ = [
- ("data", DataType4)
- ]
-
- class Test3C3(Structure):
- _fields_ = [
- ("x", c_double),
- ("y", c_double),
- ("z", c_double),
- ("t", c_double)
- ]
-
- class Test3D1(Structure):
- _fields_ = [
- ("data", c_double * 5)
- ]
-
- class DataType5(Array):
- _type_ = c_double
- _length_ = 5
-
- class Test3D2(Structure):
- _fields_ = [
- ("data", DataType5)
- ]
-
- class Test3D3(Structure):
- _fields_ = [
- ("x", c_double),
- ("y", c_double),
- ("z", c_double),
- ("t", c_double),
- ("u", c_double)
- ]
-
# Load the shared library
dll = CDLL(_ctypes_test.__file__)
@@ -596,6 +551,58 @@ class StructureTestCase(unittest.TestCase):
self.assertAlmostEqual(s.more_data[0], -3.0, places=6)
self.assertAlmostEqual(s.more_data[1], -2.0, places=6)
+ @unittest.skipIf(
+ 'ppc64le' in platform.uname().machine,
+ "gh-110190: currently fails on ppc64le",
+ )
+ def test_array_in_struct_registers(self):
+ dll = CDLL(_ctypes_test.__file__)
+
+ class Test3C1(Structure):
+ _fields_ = [
+ ("data", c_double * 4)
+ ]
+
+ class DataType4(Array):
+ _type_ = c_double
+ _length_ = 4
+
+ class Test3C2(Structure):
+ _fields_ = [
+ ("data", DataType4)
+ ]
+
+ class Test3C3(Structure):
+ _fields_ = [
+ ("x", c_double),
+ ("y", c_double),
+ ("z", c_double),
+ ("t", c_double)
+ ]
+
+ class Test3D1(Structure):
+ _fields_ = [
+ ("data", c_double * 5)
+ ]
+
+ class DataType5(Array):
+ _type_ = c_double
+ _length_ = 5
+
+ class Test3D2(Structure):
+ _fields_ = [
+ ("data", DataType5)
+ ]
+
+ class Test3D3(Structure):
+ _fields_ = [
+ ("x", c_double),
+ ("y", c_double),
+ ("z", c_double),
+ ("t", c_double),
+ ("u", c_double)
+ ]
+
# Tests for struct Test3C
expected = (1.0, 2.0, 3.0, 4.0)
func = dll._testfunc_array_in_struct_set_defaults_3C