diff options
author | Tim Newsome <tim@sifive.com> | 2023-07-06 14:41:39 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2023-07-17 09:35:00 -0700 |
commit | 995fa259b95f5c1b77fe768a00a7d444162fb36f (patch) | |
tree | 77a1adf25d658c0eb242fc30a4fe6ac77c7b7675 /debug/testlib.py | |
parent | ba831d02bdb4249ef744bd04da6c912680c7b66e (diff) | |
download | riscv-tests-995fa259b95f5c1b77fe768a00a7d444162fb36f.zip riscv-tests-995fa259b95f5c1b77fe768a00a7d444162fb36f.tar.gz riscv-tests-995fa259b95f5c1b77fe768a00a7d444162fb36f.tar.bz2 |
debug: CeaseRunTest -> UnavailableRunTest
Use new spike mechanism to test OpenOCD behavior when the current hart
becomes unavailable while running.
Create ThreadTerminated exception.
Diffstat (limited to 'debug/testlib.py')
-rw-r--r-- | debug/testlib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index fd9882a..63cc49c 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -555,6 +555,9 @@ class UnknownThread(Exception): def __init__(self, explanation): Exception.__init__(self, explanation) +class ThreadTerminated(Exception): + pass + Thread = collections.namedtuple('Thread', ('id', 'description', 'target_id', 'name', 'frame')) @@ -762,6 +765,8 @@ class Gdb: output = self.command(f"thread {h['thread'].id}", ops=5) if "Unknown" in output: raise UnknownThread(output) + if f"Thread ID {h['thread'].id} has terminated" in output: + raise ThreadTerminated(output) def push_state(self): self.stack.append({ |