]> granicus.if.org Git - python/commitdiff
bpo-22273: Disabled tests while investigating buildbot failures on ARM7L/PPC64. ...
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Wed, 25 Sep 2019 06:58:32 +0000 (07:58 +0100)
committerGitHub <noreply@github.com>
Wed, 25 Sep 2019 06:58:32 +0000 (07:58 +0100)
Lib/ctypes/test/test_structures.py
Modules/_ctypes/stgdict.c

index 11c194b0b73e2c1ed0920ab3132eeee8ed51d49a..67d98c9899c323b75c3143732c4a8dfe5f4ab57e 100644 (file)
@@ -1,3 +1,4 @@
+import platform
 import unittest
 from ctypes import *
 from ctypes.test import need_symbol
@@ -5,6 +6,8 @@ from struct import calcsize
 import _ctypes_test
 from test import support
 
+MACHINE = platform.machine()
+
 class SubclassesTest(unittest.TestCase):
     def test_subclass(self):
         class X(Structure):
@@ -477,6 +480,8 @@ class StructureTestCase(unittest.TestCase):
         self.assertEqual(s.first, got.first)
         self.assertEqual(s.second, got.second)
 
+    @unittest.skipIf(MACHINE in ('armv7l', 'ppc64'),
+                     'Test temporarily disabled on this architecture')
     def test_array_in_struct(self):
         # See bpo-22273
 
index 62dceceb4f4e715e564375c5aaeb44c77d713f8b..9c42a4f68e51b6a6104febc628ca5c1772511065 100644 (file)
@@ -652,7 +652,7 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
 
 #define MAX_ELEMENTS 16
 
-    if (arrays_seen && (size <= 16)) {
+    if (arrays_seen && (size <= MAX_ELEMENTS)) {
         /*
          * See bpo-22273. Arrays are normally treated as pointers, which is
          * fine when an array name is being passed as parameter, but not when