Skip to content

Commit d0ad3ba

Browse files
committed
KVM: selftests: Convert ARM's vGIC IRQ test to printf style GUEST_ASSERT
Use printf-based guest assert reporting in ARM's vGIC IRQ test. Note, this is not as innocuous as it looks! The printf-based version of GUEST_ASSERT_EQ() ensures the expressions are evaluated only once, whereas the old version did not! Link: https://lore.kernel.org/r/20230729003643.1053367-15-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent df27f6b commit d0ad3ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/kvm/aarch64/vgic_irq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* host to inject a specific intid via a GUEST_SYNC call, and then checks that
88
* it received it.
99
*/
10+
#define USE_GUEST_ASSERT_PRINTF 1
1011

1112
#include <asm/kvm.h>
1213
#include <asm/kvm_para.h>
@@ -781,7 +782,7 @@ static void test_vgic(uint32_t nr_irqs, bool level_sensitive, bool eoi_split)
781782
run_guest_cmd(vcpu, gic_fd, &inject_args, &args);
782783
break;
783784
case UCALL_ABORT:
784-
REPORT_GUEST_ASSERT_2(uc, "values: %#lx, %#lx");
785+
REPORT_GUEST_ASSERT(uc);
785786
break;
786787
case UCALL_DONE:
787788
goto done;

0 commit comments

Comments
 (0)