Commit 6f974494 authored by Vipin Sharma's avatar Vipin Sharma Committed by Paolo Bonzini

KVM: selftests: Print expected and actual exit reason in KVM exit reason assert

Print what KVM exit reason a test was expecting and what it actually
got int TEST_ASSERT_KVM_EXIT_REASON().
Signed-off-by: default avatarVipin Sharma <vipinsh@google.com>
Message-Id: <20230204014547.583711-3-vipinsh@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent c96f57b0
......@@ -67,7 +67,8 @@ void test_assert(bool exp, const char *exp_str,
__u32 exit_reason = (vcpu)->run->exit_reason; \
\
TEST_ASSERT(exit_reason == (expected), \
"Unexpected exit reason: %u (%s)", \
"Wanted KVM exit reason: %u (%s), got: %u (%s)", \
(expected), exit_reason_str((expected)), \
exit_reason, exit_reason_str(exit_reason)); \
} while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment