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

compiler tests: Correct bad timetrap limit #8680

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

frej
Copy link
Contributor

@frej frej commented Jul 22, 2024

The compiler's random_code test suite always fails when running with a debug emulator due to a timeout_value exit. A timeout_value exit appears to be triggered when a timer is given a timeout that is either miss-formed or out of range. Checking the relevant part of random_code_SUITE, it appears that the timeout is calculated in milliseconds, but it is given to ct:timetrap/1 as a timeout in seconds.

Although not sure about the exact failure mechanism, changing the calculation to produce a timeout in seconds, allows the test-suite to successfully complete both with an opt and debug build of the emulator.

The compiler's random_code test suite always fails when running with a
debug emulator due to a `timeout_value` exit. A `timeout_value` exit
appears to be triggered when a timer is given a timeout that is either
miss-formed or out of range. Checking the relevant part of
`random_code_SUITE`, it appears that the timeout is calculated in
milliseconds, but it is given to `ct:timetrap/1` as a timeout in
seconds.

Although not sure about the exact failure mechanism, changing the
calculation to produce a timeout in seconds, allows the test-suite to
successfully complete both with an `opt` and `debug` build of the
emulator.
Copy link
Contributor

github-actions bot commented Jul 22, 2024

CT Test Results

    2 files    321 suites   11m 24s ⏱️
  816 tests   814 ✅ 2 💤 0 ❌
5 379 runs  5 377 ✅ 2 💤 0 ❌

Results for commit 9a6084d.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@RaimoNiskanen RaimoNiskanen added the team:VM Assigned to OTP team VM label Jul 23, 2024
@jhogberg jhogberg self-assigned this Jul 24, 2024
@jhogberg jhogberg added the testing currently being tested, tag is used by OTP internal CI label Jul 24, 2024
@jhogberg jhogberg merged commit 71a30ba into erlang:master Jul 29, 2024
17 checks passed
@jhogberg
Copy link
Contributor

Merged, thanks for the PR!

@frej frej deleted the frej/fix-timetrap-argument branch July 29, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants