Skip to content

Commit

Permalink
folly: fix github ci tests on macos arm
Browse files Browse the repository at this point in the history
Summary:
These were [failing on github](https://github.com/facebook/folly/actions/runs/9923539774/job/27413784309#step:48:6919)

I think the problem was the macos runner changed from intel to arm, expectations needed updating for arm.

X-link: facebook/folly#2253

Reviewed By: ndmitchell

Differential Revision: D59733599

Pulled By: ahornby

fbshipit-source-id: e7f00184e867a5bf296836ea8c4a4f2430d9635a
  • Loading branch information
ahornby authored and facebook-github-bot committed Jul 15, 2024
1 parent 90b0efc commit e2ae590
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions third-party/folly/src/folly/memory/test/ArenaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() << " < "
Expand Down
6 changes: 6 additions & 0 deletions third-party/folly/src/folly/test/ConstexprMathTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.);
Expand Down

0 comments on commit e2ae590

Please sign in to comment.