summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2023-12-07 14:07:45 (GMT)
committerGitHub <noreply@github.com>2023-12-07 14:07:45 (GMT)
commit8f1c9128dd5f0976f9635cb43691d7914438903d (patch)
tree6c2bd665577667a1d0533115152f41c854643c8e /Lib
parentf27271619e7606338d194d669bbab4823517f7be (diff)
downloadcpython-8f1c9128dd5f0976f9635cb43691d7914438903d.zip
cpython-8f1c9128dd5f0976f9635cb43691d7914438903d.tar.gz
cpython-8f1c9128dd5f0976f9635cb43691d7914438903d.tar.bz2
[3.12] gh-110190: Temporarily skip new test introduced in gh-112604 on PPC64LE (GH-112818) (#112829)
(cherry picked from commit 9f67042f28bf886a9bf30fed6795d26cff255f1e) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ctypes/test_structures.py97
1 files changed, 52 insertions, 45 deletions
diff --git a/Lib/test/test_ctypes/test_structures.py b/Lib/test/test_ctypes/test_structures.py
index 978bfed..3bffaa3 100644
--- a/Lib/test/test_ctypes/test_structures.py
+++ b/Lib/test/test_ctypes/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