summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Bennée2021-04-01 12:25:26 +0200
committerAlex Bennée2021-04-06 16:04:42 +0200
commit1cb8d12f79a6d063455eb43ddf3f2855932b5384 (patch)
tree3208f9fea029c6baa235857022becc011e7c983d
parenttests/tcg/i386: force -fno-pie for test-i386 (diff)
downloadqemu-1cb8d12f79a6d063455eb43ddf3f2855932b5384.tar.gz
qemu-1cb8d12f79a6d063455eb43ddf3f2855932b5384.tar.xz
qemu-1cb8d12f79a6d063455eb43ddf3f2855932b5384.zip
tests/tcg: relax the next step precision of the gdb sha1 test
Depending on the version of gdb we may not execute the first line of SHA1Init when executing the first "next" command - instead just stepping over the preamble. As we don't actually care about the position of the PC after the steps and want to be sure the context->state[] has been loaded before we inspect it do a double next at the start. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210401102530.12030-8-alex.bennee@linaro.org>
-rw-r--r--tests/tcg/multiarch/gdbstub/sha1.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/tcg/multiarch/gdbstub/sha1.py b/tests/tcg/multiarch/gdbstub/sha1.py
index 2bfde49633..423b720e6d 100644
--- a/tests/tcg/multiarch/gdbstub/sha1.py
+++ b/tests/tcg/multiarch/gdbstub/sha1.py
@@ -40,7 +40,10 @@ def run_test():
check_break("SHA1Init")
- # check step and inspect values
+ # Check step and inspect values. We do a double next after the
+ # breakpoint as depending on the version of gdb we may step the
+ # preamble and not the first actual line of source.
+ gdb.execute("next")
gdb.execute("next")
val_ctx = gdb.parse_and_eval("context->state[0]")
exp_ctx = 0x67452301