mbox series

[kvm-unit-tests,0/3] arm64: debug: add migration tests for debug state

Message ID 20211210165804.1623253-1-ricarkol@google.com (mailing list archive)
Headers show
Series arm64: debug: add migration tests for debug state | expand

Message

Ricardo Koller Dec. 10, 2021, 4:58 p.m. UTC
Add some tests for checking that we can migrate debug state correctly: setup
some breakpoints/watchpoints/single-stepping, migrate, and then check that we
get the expected exceptions.

The 3 patches in this series add tests for breakpoints, watchpoints, and
single-stepping one patch at a time.  Each patch adds a migration test and a
sanity test (to test that debugging works with no migration).

Note that this is limited to 64-bits and a single vcpu. Also note that some of
the code, like reset_debug_state, is borrowed from kvm selftests.

Ricardo Koller (3):
  arm64: debug: add a migration test for breakpoint state
  arm64: debug: add a migration test for watchpoint state
  arm64: debug: add a migration test for single-step state

 arm/Makefile.arm64 |   1 +
 arm/debug.c        | 420 +++++++++++++++++++++++++++++++++++++++++++++
 arm/unittests.cfg  |  37 ++++
 3 files changed, 458 insertions(+)
 create mode 100644 arm/debug.c

Comments

Andrew Jones Dec. 14, 2021, 1:34 p.m. UTC | #1
On Fri, Dec 10, 2021 at 08:58:01AM -0800, Ricardo Koller wrote:
> Add some tests for checking that we can migrate debug state correctly: setup
> some breakpoints/watchpoints/single-stepping, migrate, and then check that we
> get the expected exceptions.
> 
> The 3 patches in this series add tests for breakpoints, watchpoints, and
> single-stepping one patch at a time.  Each patch adds a migration test and a
> sanity test (to test that debugging works with no migration).
> 
> Note that this is limited to 64-bits and a single vcpu. Also note that some of
> the code, like reset_debug_state, is borrowed from kvm selftests.
> 
> Ricardo Koller (3):
>   arm64: debug: add a migration test for breakpoint state
>   arm64: debug: add a migration test for watchpoint state
>   arm64: debug: add a migration test for single-step state
> 
>  arm/Makefile.arm64 |   1 +
>  arm/debug.c        | 420 +++++++++++++++++++++++++++++++++++++++++++++
>  arm/unittests.cfg  |  37 ++++
>  3 files changed, 458 insertions(+)
>  create mode 100644 arm/debug.c
> 
> -- 
> 2.34.1.173.g76aa8bc2d0-goog
>

Applied to https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue

Thanks,
drew