gh-116622: Test updates for Android (#117299)

- re-enable test_fcntl_64_bit on Linux aarch64, but disable it on all
  Android ABIs
- use support.setswitchinterval in all relevant tests
- skip test_fma_zero_result on Android x86_64
- accept EACCES when calling os.get_terminal_size on Android
This commit is contained in:
Malcolm Smith 2024-04-05 21:57:36 +01:00 committed by GitHub
parent 6150bb2412
commit 1d3225ae05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 21 additions and 14 deletions

View file

@ -3934,7 +3934,12 @@ class TermsizeTests(unittest.TestCase):
try:
size = os.get_terminal_size()
except OSError as e:
if sys.platform == "win32" or e.errno in (errno.EINVAL, errno.ENOTTY):
known_errnos = [errno.EINVAL, errno.ENOTTY]
if sys.platform == "android":
# The Android testbed redirects the native stdout to a pipe,
# which returns a different error code.
known_errnos.append(errno.EACCES)
if sys.platform == "win32" or e.errno in known_errnos:
# Under win32 a generic OSError can be thrown if the
# handle cannot be retrieved
self.skipTest("failed to query terminal size")