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

@ -2691,12 +2691,12 @@ class FMATests(unittest.TestCase):
self.assertEqual(math.fma(-b, -math.inf, c), math.inf)
self.assertEqual(math.fma(-b, math.inf, c), -math.inf)
# gh-73468: On WASI and FreeBSD, libc fma() doesn't implement IEE 754-2008
# gh-73468: On some platforms, libc fma() doesn't implement IEE 754-2008
# properly: it doesn't use the right sign when the result is zero.
@unittest.skipIf(support.is_wasi,
"WASI fma() doesn't implement IEE 754-2008 properly")
@unittest.skipIf(sys.platform.startswith('freebsd'),
"FreeBSD fma() doesn't implement IEE 754-2008 properly")
@unittest.skipIf(
sys.platform.startswith(("freebsd", "wasi"))
or (sys.platform == "android" and platform.machine() == "x86_64"),
f"this platform doesn't implement IEE 754-2008 properly")
def test_fma_zero_result(self):
nonnegative_finites = [0.0, 1e-300, 2.3, 1e300]