8000 bpo-22273: Disabled tests while investigating buildbot failures on AR… · python/cpython@57dc7d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 57dc7d5

Browse files
authored
bpo-22273: Disabled tests while investigating buildbot failures on ARM7L/PPC64. (GH-16377)
1 parent f163aea commit 57dc7d5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Lib/ctypes/test/test_structures.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import platform
12
import unittest
23
from ctypes import *
34
from ctypes.test import need_symbol
45
from struct import calcsize
56
import _ctypes_test
67
from test import support
78

9+
MACHINE = platform.machine()
10+
811
class SubclassesTest(unittest.TestCase):
912
def test_subclass(self):
1013
class X(Structure):
@@ -477,6 +480,8 @@ class X(Structure):
477480
self.assertEqual(s.first, got.first)
478481
self.assertEqual(s.second, got.second)
479482

483+
@unittest.skipIf(MACHINE in ('armv7l', 'ppc64'),
484+
'Test temporarily disabled on this architecture')
480485
def test_array_in_struct(self):
481486
# See bpo-22273
482487

Modules/_ctypes/stgdict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
652652

653653
#define MAX_ELEMENTS 16
654654

655-
if (arrays_seen && (size <= 16)) {
655+
if (arrays_seen && (size <= MAX_ELEMENTS)) {
656656
/*
657657
* See bpo-22273. Arrays are normally treated as pointers, which is
658658
* fine when an array name is being passed as parameter, but not when

0 commit comments

Comments
 (0)
0