Skip to content

Commit 6d89201

Browse files
committed
Bug#24624556: RDTIMESTAMPCOUNTER.TESTCYCLE UNIT TEST FAILS ON AARCH64.
The precision of the low-level ARM64 cycle timer varies depending on implementation. Our current unit tests assumes that the precision is low and therefore fails on some ARM64 machines. Remove this check from the unit test so that the unit test passes on ARM64 regardless of precision.
1 parent 72625b2 commit 6d89201

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

unittest/gunit/mysys_my_rdtsc-t.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ TEST_F(RDTimeStampCounter, TestCycle)
113113
}
114114

115115
#if defined(__aarch64__)
116-
/* The ARM cycle timer has low resolution */
116+
/*
117+
The ARM cycle timer can have low resolution, so backward can be
118+
0 or >0 depending on machine.
119+
*/
117120
EXPECT_EQ(LOOP_COUNT, nonzero);
118-
EXPECT_NE(0, backward);
119121
#else
120122
/* Expect at most 1 backward, the cycle value can overflow */
121123
EXPECT_TRUE((backward <= 1)) << "The cycle timer is strictly increasing";

0 commit comments

Comments
 (0)