Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test failure on fast machine (release builds) #1075

Merged
merged 2 commits into from
Apr 24, 2023
Merged

Conversation

greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented Apr 24, 2023

When I build in release mode, I have the following tests failing (both gcc-12 and clang-16, no problem in debug)

/home/greg/github/enf/leap/unittests/api_tests.cpp(1078): error: in "api_tests/checktime_pause_max_trx_cpu_extended_test": elapsed 26100us 
/home/greg/github/enf/leap/unittests/api_tests.cpp(1136): error: in "api_tests/checktime_pause_max_trx_extended_test": elapsed 26056us

This is the first failure in the code:

   // This assumes that loading the WASM takes at least 1.5 ms
   // If this check fails but duration is >= 24'999 (previous check did not fail), then the check here is likely
   // because WASM took less than 1.5 ms to load.
   BOOST_CHECK_MESSAGE( dur > 26'500, "elapsed " << dur << "us" );

I also have the following failure occasionally when building in release with gcc-12.

/home/greg/github/enf/leap_main/unittests/api_tests.cpp(1351): error: in "api_tests/checktime_hashing_fail": exception deadline_exception expected but not raised

So lowering deadline from 10ms to 8ms.

When I build in release mode, I have the following tests failing (both gcc-12 and clang-16, no problem in debug)
/home/greg/github/enf/leap/unittests/api_tests.cpp(1078): error: in "api_tests/checktime_pause_max_trx_cpu_extended_test": elapsed 26100us
/home/greg/github/enf/leap/unittests/api_tests.cpp(1136): error: in "api_tests/checktime_pause_max_trx_extended_test": elapsed 26056us

This is the first failure in the code:

      // This assumes that loading the WASM takes at least 1.5 ms
   // If this check fails but duration is >= 24'999 (previous check did not fail), then the check here is likely
   // because WASM took less than 1.5 ms to load.
   BOOST_CHECK_MESSAGE( dur > 26'500, "elapsed " << dur << "us" );
@greg7mdp greg7mdp requested review from heifner and linh2931 April 24, 2023 17:52
@greg7mdp greg7mdp requested a review from vladtr April 24, 2023 18:07
@greg7mdp greg7mdp merged commit b67d174 into main Apr 24, 2023
@greg7mdp greg7mdp deleted the fix_abi_test_check branch April 24, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants