diff options
| author | Vipin Sharma <[email protected]> | 2023-02-04 01:45:44 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2023-03-14 14:20:09 +0000 |
| commit | c96f57b08012805da323c6bdf929bab1b88d250c (patch) | |
| tree | 462f58f1e9409d8ac1b3b65c6b037dd6a7f511df /tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c | |
| parent | KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test (diff) | |
| download | kernel-c96f57b08012805da323c6bdf929bab1b88d250c.tar.gz kernel-c96f57b08012805da323c6bdf929bab1b88d250c.zip | |
KVM: selftests: Make vCPU exit reason test assertion common
Make TEST_ASSERT_KVM_EXIT_REASON() macro and replace all exit reason
test assert statements with it.
No functional changes intended.
Signed-off-by: Vipin Sharma <[email protected]>
Reviewed-by: David Matlack <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c')
| -rw-r--r-- | tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c b/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c index ac33835f78f4..6502aa23c2f8 100644 --- a/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c +++ b/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c @@ -166,12 +166,9 @@ static void __attribute__((__flatten__)) l1_guest_code(void *test_data) static void assert_ucall_vector(struct kvm_vcpu *vcpu, int vector) { - struct kvm_run *run = vcpu->run; struct ucall uc; - TEST_ASSERT(run->exit_reason == KVM_EXIT_IO, - "Unexpected exit reason: %u (%s),\n", - run->exit_reason, exit_reason_str(run->exit_reason)); + TEST_ASSERT_KVM_EXIT_REASON(vcpu, KVM_EXIT_IO); switch (get_ucall(vcpu, &uc)) { case UCALL_SYNC: |
