Skip to content

gh-91214: Skip tests failing on Solaris #31978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Lib/test/test_locale.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ def test_strcoll(self):
self.assertRaises(ValueError, locale.strcoll, 'a\0', 'a')
self.assertRaises(ValueError, locale.strcoll, 'a', 'a\0')

@unittest.skipIf(sys.platform.startswith('sunos'),
'bpo-47058: broken on Solaris')
def test_strxfrm(self):
self.assertLess(locale.strxfrm('a'), locale.strxfrm('b'))
# embedded null character
Expand Down Expand Up @@ -360,6 +362,8 @@ def test_strcoll_with_diacritic(self):

@unittest.skipIf(sys.platform.startswith('aix'),
'bpo-29972: broken test on AIX')
@unittest.skipIf(sys.platform.startswith('sunos'),
'bpo-47058: broken on Solaris')
@unittest.skipIf(
is_emscripten or is_wasi,
"musl libc issue on Emscripten/WASI, bpo-46390"
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_re.py
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,8 @@ def test_bug_20998(self):
# with ignore case.
self.assertEqual(re.fullmatch('[a-c]+', 'ABC', re.I).span(), (0, 3))

@unittest.skipIf(sys.platform.startswith("sunos"),
"test doesn't work on Solaris, bpo-47058")
@unittest.skipIf(
is_emscripten or is_wasi,
"musl libc issue on Emscripten/WASI, bpo-46390"
Expand Down Expand Up @@ -2026,6 +2028,8 @@ def check_en_US_utf8(self):
self.assertIsNone(re.match(b'(?Li)\xc5', b'\xe5'))
self.assertIsNone(re.match(b'(?Li)\xe5', b'\xc5'))

@unittest.skipIf(sys.platform.startswith("sunos"),
"test doesn't work on Solaris, bpo-47058")
@unittest.skipIf(
is_emscripten or is_wasi,
"musl libc issue on Emscripten/WASI, bpo-46390"
Expand Down
7 changes: 6 additions & 1 deletion Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

VSOCKPORT = 1234
AIX = platform.system() == "AIX"
SOLARIS = sys.platform.startswith("sunos")
WSL = "microsoft-standard-WSL" in platform.release()

try:
Expand Down Expand Up @@ -3568,7 +3569,7 @@ def testCMSG_SPACE(self):
# Test CMSG_SPACE() with various valid and invalid values,
# checking the assumptions used by sendmsg().
toobig = self.socklen_t_limit - socket.CMSG_SPACE(1) + 1
values = list(range(257)) + list(range(toobig - 257, toobig))
values = list(range(257)) + list(range(toobig - 257, toobig - 8))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a 'fix' we are using internally, probably not acceptable (more in the issue tracker).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the values of socklen_t_limit and socket.CMSG_SPACE(1) on Solaris?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I think that the simplest way to resolve this is to add Solaris-specific fix:

Suggested change
values = list(range(257)) + list(range(toobig - 257, toobig - 8))
if SOLARIS:
toobig -= 8
values = list(range(257)) + list(range(toobig - 257, toobig))


last = socket.CMSG_SPACE(0)
# struct cmsghdr has at least three members, two of which are ints
Expand Down Expand Up @@ -3714,6 +3715,7 @@ def _testFDPassCMSG_LEN(self):
self.createAndSendFDs(1)

@unittest.skipIf(is_apple, "skipping, see issue #12958")
@unittest.skipIf(SOLARIS, "skipping, see issue #47058")
@unittest.skipIf(AIX, "skipping, see issue #22397")
@requireAttrs(socket, "CMSG_SPACE")
def testFDPassSeparate(self):
Expand All @@ -3725,6 +3727,7 @@ def testFDPassSeparate(self):

@testFDPassSeparate.client_skip
@unittest.skipIf(is_apple, "skipping, see issue #12958")
@unittest.skipIf(SOLARIS, "skipping, see issue #47058")
@unittest.skipIf(AIX, "skipping, see issue #22397")
def _testFDPassSeparate(self):
fd0, fd1 = self.newFDs(2)
Expand All @@ -3738,6 +3741,7 @@ def _testFDPassSeparate(self):
len(MSG))

@unittest.skipIf(is_apple, "skipping, see issue #12958")
@unittest.skipIf(SOLARIS, "skipping, see issue #47058")
@unittest.skipIf(AIX, "skipping, see issue #22397")
@requireAttrs(socket, "CMSG_SPACE")
def testFDPassSeparateMinSpace(self):
Expand All @@ -3752,6 +3756,7 @@ def testFDPassSeparateMinSpace(self):

@testFDPassSeparateMinSpace.client_skip
@unittest.skipIf(is_apple, "skipping, see issue #12958")
@unittest.skipIf(SOLARIS, "skipping, see issue #47058")
@unittest.skipIf(AIX, "skipping, see issue #22397")
def _testFDPassSeparateMinSpace(self):
fd0, fd1 = self.newFDs(2)
Expand Down