Skip to content

Commit 34ed038

Browse files
authored
gh-91214: Skip tests failing on Solaris (GH-31978)
1 parent 8cf547f commit 34ed038

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Lib/test/test_re.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import locale
66
import re
77
import string
8+
import sys
89
import unittest
910
import warnings
1011
from re import Scanner
@@ -2177,6 +2178,8 @@ def test_bug_20998(self):
21772178
self.assertEqual(re.fullmatch('[a-c]+', 'ABC', re.I).span(), (0, 3))
21782179

21792180
@unittest.skipIf(linked_to_musl(), "musl libc issue, bpo-46390")
2181+
@unittest.skipIf(sys.platform.startswith("sunos"),
2182+
"test doesn't work on Solaris, gh-91214")
21802183
def test_locale_caching(self):
21812184
# Issue #22410
21822185
oldlocale = locale.setlocale(locale.LC_CTYPE)
@@ -2214,6 +2217,8 @@ def check_en_US_utf8(self):
22142217
self.assertIsNone(re.match(b'(?Li)\xe5', b'\xc5'))
22152218

22162219
@unittest.skipIf(linked_to_musl(), "musl libc issue, bpo-46390")
2220+
@unittest.skipIf(sys.platform.startswith("sunos"),
2221+
"test doesn't work on Solaris, gh-91214")
22172222
def test_locale_compiled(self):
22182223
oldlocale = locale.setlocale(locale.LC_CTYPE)
22192224
self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)

Lib/test/test_socket.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252

5353
VSOCKPORT = 1234
5454
AIX = platform.system() == "AIX"
55+
SOLARIS = sys.platform.startswith("sunos")
5556
WSL = "microsoft-standard-WSL" in platform.release()
5657

5758
try:
@@ -3922,6 +3923,10 @@ def testCMSG_SPACE(self):
39223923
# Test CMSG_SPACE() with various valid and invalid values,
39233924
# checking the assumptions used by sendmsg().
39243925
toobig = self.socklen_t_limit - socket.CMSG_SPACE(1) + 1
3926+
if SOLARIS and platform.processor() == "sparc":
3927+
# On Solaris SPARC, number of bytes returned by socket.CMSG_SPACE
3928+
# increases at different lengths; see gh-91214.
3929+
toobig -= 3
39253930
values = list(range(257)) + list(range(toobig - 257, toobig))
39263931

39273932
last = socket.CMSG_SPACE(0)
@@ -4068,6 +4073,7 @@ def _testFDPassCMSG_LEN(self):
40684073
self.createAndSendFDs(1)
40694074

40704075
@unittest.skipIf(is_apple, "skipping, see issue #12958")
4076+
@unittest.skipIf(SOLARIS, "skipping, see gh-91214")
40714077
@unittest.skipIf(AIX, "skipping, see issue #22397")
40724078
@requireAttrs(socket, "CMSG_SPACE")
40734079
def testFDPassSeparate(self):
@@ -4079,6 +4085,7 @@ def testFDPassSeparate(self):
40794085

40804086
@testFDPassSeparate.client_skip
40814087
@unittest.skipIf(is_apple, "skipping, see issue #12958")
4088+
@unittest.skipIf(SOLARIS, "skipping, see gh-91214")
40824089
@unittest.skipIf(AIX, "skipping, see issue #22397")
40834090
def _testFDPassSeparate(self):
40844091
fd0, fd1 = self.newFDs(2)
@@ -4092,6 +4099,7 @@ def _testFDPassSeparate(self):
40924099
len(MSG))
40934100

40944101
@unittest.skipIf(is_apple, "skipping, see issue #12958")
4102+
@unittest.skipIf(SOLARIS, "skipping, see gh-91214")
40954103
@unittest.skipIf(AIX, "skipping, see issue #22397")
40964104
@requireAttrs(socket, "CMSG_SPACE")
40974105
def testFDPassSeparateMinSpace(self):
@@ -4106,6 +4114,7 @@ def testFDPassSeparateMinSpace(self):
41064114

41074115
@testFDPassSeparateMinSpace.client_skip
41084116
@unittest.skipIf(is_apple, "skipping, see issue #12958")
4117+
@unittest.skipIf(SOLARIS, "skipping, see gh-91214")
41094118
@unittest.skipIf(AIX, "skipping, see issue #22397")
41104119
def _testFDPassSeparateMinSpace(self):
41114120
fd0, fd1 = self.newFDs(2)

0 commit comments

Comments
 (0)