Skip to content

Commit 7be8bbb

Browse files
ezbrcopybara-github
authored andcommitted
Loosen the PointerAlignment test to allow up to 5 stuck bits to avoid flakiness.
We've seen some flaky test failures on some architectures/build modes since changing to mix pointers only once. PiperOrigin-RevId: 783015507 Change-Id: I58861ac19b62468dbcf764f6fa8308a87875a7f8
1 parent f35d6ad commit 7be8bbb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

absl/hash/hash_test.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ TEST(HashValueTest, PointerAlignment) {
192192
constexpr size_t kMask = (1 << (kLog2NumValues + 7)) - 1;
193193
size_t stuck_bits = (~bits_or | bits_and) & kMask;
194194
int stuck_bit_count = absl::popcount(stuck_bits);
195-
// Test that there are at most 4 stuck bits.
196-
EXPECT_LE(stuck_bit_count, 4) << "0x" << std::hex << stuck_bits;
195+
size_t max_stuck_bits = 5;
196+
EXPECT_LE(stuck_bit_count, max_stuck_bits)
197+
<< "0x" << std::hex << stuck_bits;
197198

198199
total_stuck_bit_count += stuck_bit_count;
199200
++test_count;

0 commit comments

Comments
 (0)