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

Print test panics using semihosting #2257

Merged
merged 7 commits into from
Oct 4, 2024
Merged

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Sep 30, 2024

It seems we still don't get valuable stack traces on Xtensa. Although, even if we had, a panic's cause is unclear. In order to provide as much info as possible, this PR changes HIL tests to output panic messages using semihosting, which is a different mechanism based on breakpoints and debugger support.

This PR is pending on probe-rs/probe-rs#2740 and probe-rs/probe-rs#2841 (which are now deployed on the runners).

There is one downside: probe-rs doesn't capture test output yet, so the test logs contain the panic messages from #[should_panic] tests.

This PR disables esp-hal/defmt for tests so that if a panic happens inside the HAL, its message gets printed.

@bugadani bugadani force-pushed the test-semihosting branch 3 times, most recently from 6fec7a4 to c3deb0a Compare September 30, 2024 19:28
@bugadani bugadani marked this pull request as ready for review October 1, 2024 07:06
@bugadani bugadani marked this pull request as draft October 1, 2024 07:22
@bugadani

This comment was marked as resolved.

@bugadani bugadani marked this pull request as ready for review October 2, 2024 16:50
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bjoernQ bjoernQ added this pull request to the merge queue Oct 4, 2024
Merged via the queue into esp-rs:main with commit c7a2368 Oct 4, 2024
28 checks passed
@bugadani bugadani deleted the test-semihosting branch October 4, 2024 07:12
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