diff --git a/folly/memory/test/ArenaTest.cpp b/folly/memory/test/ArenaTest.cpp index 90b9c1633a3..a53138f6ea0 100644 --- a/folly/memory/test/ArenaTest.cpp +++ b/folly/memory/test/ArenaTest.cpp @@ -77,6 +77,10 @@ TEST(Arena, SizeSanity) { minimum_size += 10 * requestedBlockSize; maximum_size += goodMallocSize(10 * requestedBlockSize + SysArena::kBlockOverhead); +#if defined(__APPLE__) && defined(FOLLY_AARCH64) + // expectation is a bit too small + maximum_size += 8; +#endif EXPECT_GE(arena.totalSize(), minimum_size); EXPECT_LE(arena.totalSize(), maximum_size); VLOG(4) << minimum_size << " < " << arena.totalSize() << " < " diff --git a/folly/test/ConstexprMathTest.cpp b/folly/test/ConstexprMathTest.cpp index db61e050c00..bc48de55335 100644 --- a/folly/test/ConstexprMathTest.cpp +++ b/folly/test/ConstexprMathTest.cpp @@ -987,7 +987,13 @@ TEST_F(ConstexprMathTest, constexpr_exp_floating) { } { constexpr auto a = folly::constexpr_exp(471.L); +#if defined(__APPLE__) && defined(FOLLY_AARCH64) + EXPECT_LT( // too inexact for expect-double-eq + std::exp(471.L) / a - 1, + 16 * lim::epsilon()); +#else EXPECT_DOUBLE_EQ(std::exp(471.L), a); +#endif } { constexpr auto a = folly::constexpr_exp(600.);