Skip to content

Commit 847ae07

Browse files
committed
KVM: selftests: Convert x86's TSC MSRs test to use printf guest asserts
Convert x86's TSC MSRs test, and it's liberal use of GUEST_ASSERT_EQ(), to use printf-based guest assert reporting. Link: https://lore.kernel.org/r/20230729003643.1053367-29-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent a925f79 commit 847ae07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/testing/selftests/kvm/x86_64/tsc_msrs_test.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
*
55
* Copyright (C) 2020, Red Hat, Inc.
66
*/
7+
#define USE_GUEST_ASSERT_PRINTF 1
8+
79
#include <stdio.h>
810
#include <string.h>
911
#include "kvm_util.h"
@@ -84,7 +86,7 @@ static void run_vcpu(struct kvm_vcpu *vcpu, int stage)
8486
ksft_test_result_pass("stage %d passed\n", stage + 1);
8587
return;
8688
case UCALL_ABORT:
87-
REPORT_GUEST_ASSERT_2(uc, "values: %#lx, %#lx");
89+
REPORT_GUEST_ASSERT(uc);
8890
default:
8991
TEST_ASSERT(false, "Unexpected exit: %s",
9092
exit_reason_str(vcpu->run->exit_reason));

0 commit comments

Comments
 (0)