selftests: kvm: report failed stage when exit reason is unexpected
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 19 Dec 2018 11:15:18 +0000 (12:15 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Dec 2018 10:28:21 +0000 (11:28 +0100)
commitb85c32dd27495075380350fcd5d614a6b45311b8
treea44b6c4ac29afb7cee08066e3025dc15d02fe6b7
parente87555e550cef4941579cd879759a7c0dee24e68
selftests: kvm: report failed stage when exit reason is unexpected

When we get a report like

==== Test Assertion Failure ====
  x86_64/state_test.c:157: run->exit_reason == KVM_EXIT_IO
  pid=955 tid=955 - Success
     1 0x0000000000401350: main at state_test.c:154
     2 0x00007fc31c9e9412: ?? ??:0
     3 0x000000000040159d: _start at ??:?
  Unexpected exit reason: 8 (SHUTDOWN),

it is not obvious which particular stage failed. Add the info.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
tools/testing/selftests/kvm/x86_64/evmcs_test.c
tools/testing/selftests/kvm/x86_64/state_test.c