There are several tests failing on the recently added Solaris buildbot worker. This Issue aims to fix/skip the to make Solaris green on buildbot.
################
## test_posix ##
################
Issues with the `os.sched_get_priority_min`; fix offered here: https://bugs.python.org/issue41839
#################
## test_shutil ##
#################
Issues with `sendfile` being disabled on Solaris (and test suite not being able to handle that); fix offered here: https://bugs.python.org/issue41843
#################
## test_locale ##
#################
Strxfrm does not work in the current implementation due to the difference in Solaris locale encoding (most of which was solved with https://bugs.python.org/issue43667).
Internally we have fixed this issue with:
https://github.com/oracle/solaris-userland/blob/master/components/python/python39/patches/24-strxfrm-fix.patch
But this idea was previously rejected in https://bugs.python.org/issue16258
Because of that, those tests are skipped on Solaris in the attached PR.
#############
## test_re ##
#############
On SPARC there are some weird matches in some regexes:
Traceback (most recent call last):
File ".../build/Lib/test/test_re.py", line 1907, in test_locale_caching
self.check_en_US_utf8()
File ".../build/Lib/test/test_re.py", line 1924, in check_en_US_utf8
self.assertIsNone(re.match(b'\xc5', b'\xe5', re.L|re.I))
AssertionError: <re.Match object; span=(0, 1), match=b'\xe5'> is not None
I have no idea why this is happening. I presume it is locale related, but I didn't find anything problematic yet.
The simplest way to reproduce this is (meaning that this probably isn't caching related):
```
import locale
import re
locale.setlocale(locale.LC_CTYPE, 'en_US.utf8')
print(re.match(b'\xc5', b'\xe5', re.L|re.I))
```
This returns:
<re.Match object; span=(0, 1), match=b'\xe5'> on Solaris and None on Linux.
I am happy to investigate it further; any pointers as for where to look would be appreciated as I am stuck a little bit.
#################
## test_socket ##
#################
There are two issues here. The first one is similar to what BSD, Darwin and AIX experience with testFDPass tests:
https://bugs.python.org/issue22397
https://bugs.python.org/issue12958
These tests are skipped on Solaris in the attached PR.
The other one is an incorrect assumption about CMSG_SPACE on SPARC Solaris; it grows slightly sooner when increasing length compared to other platforms I tested.
with toobig == 2147483632
length socket.CMSG_SPACE output
2147483619 2147483632
2147483620 2147483632
2147483621 2147483640
2147483622 2147483640
2147483623 2147483640
2147483624 2147483640
2147483625 2147483640
2147483626 2147483640
2147483627 2147483640
2147483628 2147483640
2147483629 <- OverflowError
======================================================================
ERROR: testCMSG_SPACE (test.test_socket.CmsgMacroTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builds/jkulik/testing/components/python/python39/Python-3.9.9/Lib/test/test_socket.py", line 3360, in testCMSG_SPACE
ret = socket.CMSG_SPACE(n)
OverflowError: CMSG_SPACE() argument out of range
(on other platforms, increases generally happen with lengths divisible by 8, meaning that it gets all the way to 2147483631).
I am unsure how to fix this (currently, PR includes change we use internally but is likely not acceptable) as I don't know how to correctly guess the largest CMSG_SPACE on all platforms. Is it even necessary though (it can test OverflowError on other values than just the first failing one and can end slightly sooner)?
###############
## test_time ##
###############
This was recently fixed with: https://bugs.python.org/issue46099
|