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

debug: Test OpenOCD behavior when harts become unavailable, using new spike mechanism #489

Merged
merged 8 commits into from
Jul 17, 2023

Conversation

timsifive
Copy link
Collaborator

These tests won't pass until riscv-collab/riscv-openocd#879 merges.

@timsifive timsifive requested a review from GregSavin July 7, 2023 17:56
Copy link
Collaborator

@GregSavin GregSavin left a comment

Choose a reason for hiding this comment

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

Some really helpful and intricate test infrastructure here.

@timsifive
Copy link
Collaborator Author

These tests sometimes fail (depending on which hart is randomly selected) in the multi-spike scenario. Instead of fixing that, I'm changing it so they don't run there. The fix is somewhat complex, the test takes forever to run (15+ minutes), and the additional coverage is negligible.

Just so it's easier to quickly comment out code and hard-code the target
to use without pylint complaining. This really should be a command line
option.
It's a bit messy to read the log file to get the output, but it seems to
be flushed often so that this works.

Also, added the `targets` method for retrieving the list of targets,
and `wait_until_running` method to wait until all targets are in a
running state.
Use the new spike mechanism to test OpenOCD behavior when a hart becomes
unavailable while running.

Create CommandException.
Use new spike mechanism to test OpenOCD behavior when the current hart
becomes unavailable while running.

Create ThreadTerminated exception.
Use new spike mechanism to test OpenOCD behavior when a hart becomes
unavailable, and then available again.
@timsifive
Copy link
Collaborator Author

Fixed a but that happened when running commands through the OpenOCD CLI when -d is passed to OpenOCD.

@timsifive timsifive merged commit cf5360f into master Jul 17, 2023
@timsifive timsifive deleted the power_dance branch July 17, 2023 18:58
timsifive added a commit to riscv-collab/riscv-openocd that referenced this pull request Jul 18, 2023
riscv-software-src/riscv-tests#489 doesn't play
nice with github workflow somehow.

Change-Id: I6efa612a085cee3b64a5e4e58408de202069c045
Signed-off-by: Tim Newsome <[email protected]>
timsifive added a commit to riscv-collab/riscv-openocd that referenced this pull request Jul 18, 2023
riscv-software-src/riscv-tests#489 doesn't play
nice with github workflow somehow.

Change-Id: I6efa612a085cee3b64a5e4e58408de202069c045
Signed-off-by: Tim Newsome <[email protected]>
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.

2 participants