Bug #82890 RDTimeStampCounter.TestCycle unit test fails on Aarch64.
Submitted: 7 Sep 2016 11:48 Modified: 3 Apr 2017 15:37
Reporter: Konstantin Chaplaev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.7.14 OS:Any
Assigned to: CPU Architecture:ARM

[7 Sep 2016 11:48] Konstantin Chaplaev
Description:
I tested it in 5.7.14, but may be true for older versions.

RDTimeStampCounter.TestCycle unit test expects that the cycle timer counter will overflow (unittest/gunit/mysys_my_rdtsc-t.cc):

#if defined(__aarch64__)
  /* The ARM cycle timer has low resolution */
  EXPECT_EQ(LOOP_COUNT, nonzero);
  EXPECT_NE(0, backward);
#else

Aarch64 cycle timer implementation uses CNTVCT_EL0 register which has a width of 64 bits,
so it can't overflow within a reasonable time.  Thus, RDTimeStampCounter.TestCycle test fails on Aarch64. 

How to repeat:
build a debug MySQL 5.7 binary
run make test
[9 Sep 2016 14:25] OCA Admin
Contribution submitted via Github - Bug #82890: RDTimeStampCounter.TestCycle test failure. 
(*) Contribution by Alexey Kopytov (Github akopytov, mysql-server/pull/100#issuecomment-245893573): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_84489077.txt (text/plain), 1.23 KiB.

[10 Sep 2016 5:35] MySQL Verification Team
Thank you Konstantin for the report and Alexey Kopytov for the contribution.

Thanks,
Umesh
[3 Apr 2017 15:37] Paul DuBois
Posted by developer:
 
Fixed in 8.0.2.

Work was done for test suite. No changelog entry needed.