Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: selftests: Fix filename reporting in guest asserts

Fix filename reporting in guest asserts by ensuring the GUEST_ASSERT
macro records __FILE__ and substituting REPORT_GUEST_ASSERT for many
repetitive calls to TEST_FAIL.

Previously filename was reported by using __FILE__ directly in the
selftest, wrongly assuming it would always be the same as where the
assertion failed.

Signed-off-by: Colton Lewis <coltonlewis@google.com>
Reported-by: Ricardo Koller <ricarkol@google.com>
Fixes: 4e18bccc2e5544f0be28fc1c4e6be47a469d6c60
Link: https://lore.kernel.org/r/20220615193116.806312-5-coltonlewis@google.com
[sean: convert more TEST_FAIL => REPORT_GUEST_ASSERT instances]
Signed-off-by: Sean Christopherson <seanjc@google.com>

authored by

Colton Lewis and committed by
Sean Christopherson
594a1c27 ddcb57af

+68 -102
+7 -4
tools/testing/selftests/kvm/aarch64/arch_timer.c
··· 231 231 break; 232 232 case UCALL_ABORT: 233 233 sync_global_from_guest(vm, *shared_data); 234 - TEST_FAIL("%s at %s:%ld\n\tvalues: %lu, %lu; %lu, vcpu: %u; stage: %u; iter: %u", 235 - (const char *)uc.args[0], __FILE__, uc.args[1], 236 - uc.args[2], uc.args[3], uc.args[4], vcpu_idx, 237 - shared_data->guest_stage, shared_data->nr_iter); 234 + REPORT_GUEST_ASSERT_N(uc, "values: %lu, %lu; %lu, vcpu %u; stage; %u; iter: %u", 235 + GUEST_ASSERT_ARG(uc, 0), 236 + GUEST_ASSERT_ARG(uc, 1), 237 + GUEST_ASSERT_ARG(uc, 2), 238 + vcpu_idx, 239 + shared_data->guest_stage, 240 + shared_data->nr_iter); 238 241 break; 239 242 default: 240 243 TEST_FAIL("Unexpected guest exit\n");
+1 -3
tools/testing/selftests/kvm/aarch64/debug-exceptions.c
··· 283 283 stage, (ulong)uc.args[1]); 284 284 break; 285 285 case UCALL_ABORT: 286 - TEST_FAIL("%s at %s:%ld\n\tvalues: %#lx, %#lx", 287 - (const char *)uc.args[0], 288 - __FILE__, uc.args[1], uc.args[2], uc.args[3]); 286 + REPORT_GUEST_ASSERT_2(uc, "values: %#lx, %#lx"); 289 287 break; 290 288 case UCALL_DONE: 291 289 goto done;
+4 -3
tools/testing/selftests/kvm/aarch64/hypercalls.c
··· 291 291 guest_done = true; 292 292 break; 293 293 case UCALL_ABORT: 294 - TEST_FAIL("%s at %s:%ld\n\tvalues: 0x%lx, 0x%lx; 0x%lx, stage: %u", 295 - (const char *)uc.args[0], __FILE__, uc.args[1], 296 - uc.args[2], uc.args[3], uc.args[4], stage); 294 + REPORT_GUEST_ASSERT_N(uc, "values: 0x%lx, 0x%lx; 0x%lx, stage: %u", 295 + GUEST_ASSERT_ARG(uc, 0), 296 + GUEST_ASSERT_ARG(uc, 1), 297 + GUEST_ASSERT_ARG(uc, 2), stage); 297 298 break; 298 299 default: 299 300 TEST_FAIL("Unexpected guest exit\n");
+1 -2
tools/testing/selftests/kvm/aarch64/psci_test.c
··· 94 94 95 95 vcpu_run(vcpu); 96 96 if (get_ucall(vcpu, &uc) == UCALL_ABORT) 97 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], __FILE__, 98 - uc.args[1]); 97 + REPORT_GUEST_ASSERT(uc); 99 98 } 100 99 101 100 static void assert_vcpu_reset(struct kvm_vcpu *vcpu)
+1 -3
tools/testing/selftests/kvm/aarch64/vgic_irq.c
··· 782 782 run_guest_cmd(vcpu, gic_fd, &inject_args, &args); 783 783 break; 784 784 case UCALL_ABORT: 785 - TEST_FAIL("%s at %s:%ld\n\tvalues: %#lx, %#lx", 786 - (const char *)uc.args[0], 787 - __FILE__, uc.args[1], uc.args[2], uc.args[3]); 785 + REPORT_GUEST_ASSERT_2(uc, "values: %#lx, %#lx"); 788 786 break; 789 787 case UCALL_DONE: 790 788 goto done;
+6 -5
tools/testing/selftests/kvm/include/ucall_common.h
··· 41 41 GUEST_ASSERT_BUILTIN_NARGS 42 42 }; 43 43 44 - #define __GUEST_ASSERT(_condition, _condstr, _nargs, _args...) do { \ 45 - if (!(_condition)) \ 46 - ucall(UCALL_ABORT, 2 + _nargs, \ 47 - "Failed guest assert: " \ 48 - _condstr, __LINE__, _args); \ 44 + #define __GUEST_ASSERT(_condition, _condstr, _nargs, _args...) \ 45 + do { \ 46 + if (!(_condition)) \ 47 + ucall(UCALL_ABORT, GUEST_ASSERT_BUILTIN_NARGS + _nargs, \ 48 + "Failed guest assert: " _condstr, \ 49 + __FILE__, __LINE__, ##_args); \ 49 50 } while (0) 50 51 51 52 #define GUEST_ASSERT(_condition) \
+1 -3
tools/testing/selftests/kvm/memslot_perf_test.c
··· 162 162 goto done; 163 163 break; 164 164 case UCALL_ABORT: 165 - TEST_FAIL("%s at %s:%ld, val = %lu", 166 - (const char *)uc.args[0], 167 - __FILE__, uc.args[1], uc.args[2]); 165 + REPORT_GUEST_ASSERT_1(uc, "val = %lu"); 168 166 break; 169 167 case UCALL_DONE: 170 168 goto done;
+12 -14
tools/testing/selftests/kvm/s390x/tprot.c
··· 181 181 GUEST_SYNC(perform_next_stage(&i, mapped_0)); 182 182 } 183 183 184 - #define HOST_SYNC_NO_TAP(vcpup, stage) \ 185 - ({ \ 186 - struct kvm_vcpu *__vcpu = (vcpup); \ 187 - struct ucall uc; \ 188 - int __stage = (stage); \ 189 - \ 190 - vcpu_run(__vcpu); \ 191 - get_ucall(__vcpu, &uc); \ 192 - if (uc.cmd == UCALL_ABORT) { \ 193 - TEST_FAIL("line %lu: %s, hints: %lu, %lu", uc.args[1], \ 194 - (const char *)uc.args[0], uc.args[2], uc.args[3]); \ 195 - } \ 196 - ASSERT_EQ(uc.cmd, UCALL_SYNC); \ 197 - ASSERT_EQ(uc.args[1], __stage); \ 184 + #define HOST_SYNC_NO_TAP(vcpup, stage) \ 185 + ({ \ 186 + struct kvm_vcpu *__vcpu = (vcpup); \ 187 + struct ucall uc; \ 188 + int __stage = (stage); \ 189 + \ 190 + vcpu_run(__vcpu); \ 191 + get_ucall(__vcpu, &uc); \ 192 + if (uc.cmd == UCALL_ABORT) \ 193 + REPORT_GUEST_ASSERT_2(uc, "hints: %lu, %lu"); \ 194 + ASSERT_EQ(uc.cmd, UCALL_SYNC); \ 195 + ASSERT_EQ(uc.args[1], __stage); \ 198 196 }) 199 197 200 198 #define HOST_SYNC(vcpu, stage) \
+1 -2
tools/testing/selftests/kvm/set_memory_region_test.c
··· 88 88 } 89 89 90 90 if (run->exit_reason == KVM_EXIT_IO && cmd == UCALL_ABORT) 91 - TEST_FAIL("%s at %s:%ld, val = %lu", (const char *)uc.args[0], 92 - __FILE__, uc.args[1], uc.args[2]); 91 + REPORT_GUEST_ASSERT_1(uc, "val = %lu"); 93 92 94 93 return NULL; 95 94 }
+1 -2
tools/testing/selftests/kvm/steal_time.c
··· 234 234 case UCALL_DONE: 235 235 break; 236 236 case UCALL_ABORT: 237 - TEST_ASSERT(false, "%s at %s:%ld", (const char *)uc.args[0], 238 - __FILE__, uc.args[1]); 237 + REPORT_GUEST_ASSERT(uc); 239 238 default: 240 239 TEST_ASSERT(false, "Unexpected exit: %s", 241 240 exit_reason_str(vcpu->run->exit_reason));
+1 -2
tools/testing/selftests/kvm/system_counter_offset_test.c
··· 83 83 84 84 static void handle_abort(struct ucall *uc) 85 85 { 86 - TEST_FAIL("%s at %s:%ld", (const char *)uc->args[0], 87 - __FILE__, uc->args[1]); 86 + REPORT_GUEST_ASSERT(*uc); 88 87 } 89 88 90 89 static void enter_guest(struct kvm_vcpu *vcpu)
+1 -2
tools/testing/selftests/kvm/x86_64/amx_test.c
··· 373 373 374 374 switch (get_ucall(vcpu, &uc)) { 375 375 case UCALL_ABORT: 376 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], 377 - __FILE__, uc.args[1]); 376 + REPORT_GUEST_ASSERT(uc); 378 377 /* NOT REACHED */ 379 378 case UCALL_SYNC: 380 379 switch (uc.args[1]) {
+1 -2
tools/testing/selftests/kvm/x86_64/cpuid_test.c
··· 132 132 case UCALL_DONE: 133 133 return; 134 134 case UCALL_ABORT: 135 - TEST_ASSERT(false, "%s at %s:%ld\n\tvalues: %#lx, %#lx", (const char *)uc.args[0], 136 - __FILE__, uc.args[1], uc.args[2], uc.args[3]); 135 + REPORT_GUEST_ASSERT_2(uc, "values: %#lx, %#lx"); 137 136 default: 138 137 TEST_ASSERT(false, "Unexpected exit: %s", 139 138 exit_reason_str(vcpu->run->exit_reason));
+1 -1
tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
··· 94 94 vcpu_sregs_set(vcpu, &sregs); 95 95 break; 96 96 case UCALL_ABORT: 97 - TEST_FAIL("Guest CR4 bit (OSXSAVE) unsynchronized with CPUID bit."); 97 + REPORT_GUEST_ASSERT(uc); 98 98 break; 99 99 case UCALL_DONE: 100 100 goto done;
+1 -2
tools/testing/selftests/kvm/x86_64/emulator_error_test.c
··· 92 92 93 93 static void do_guest_assert(struct ucall *uc) 94 94 { 95 - TEST_FAIL("%s at %s:%ld", (const char *)uc->args[0], __FILE__, 96 - uc->args[1]); 95 + REPORT_GUEST_ASSERT(*uc); 97 96 } 98 97 99 98 static void check_for_guest_assert(struct kvm_vcpu *vcpu)
+1 -2
tools/testing/selftests/kvm/x86_64/evmcs_test.c
··· 236 236 237 237 switch (get_ucall(vcpu, &uc)) { 238 238 case UCALL_ABORT: 239 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], 240 - __FILE__, uc.args[1]); 239 + REPORT_GUEST_ASSERT(uc); 241 240 /* NOT REACHED */ 242 241 case UCALL_SYNC: 243 242 break;
+1 -1
tools/testing/selftests/kvm/x86_64/fix_hypercall_test.c
··· 112 112 case UCALL_DONE: 113 113 return; 114 114 case UCALL_ABORT: 115 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], __FILE__, uc.args[1]); 115 + REPORT_GUEST_ASSERT(uc); 116 116 default: 117 117 TEST_FAIL("Unhandled ucall: %ld\nexit_reason: %u (%s)", 118 118 uc.cmd, run->exit_reason, exit_reason_str(run->exit_reason));
+1 -2
tools/testing/selftests/kvm/x86_64/hyperv_clock.c
··· 234 234 235 235 switch (get_ucall(vcpu, &uc)) { 236 236 case UCALL_ABORT: 237 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], 238 - __FILE__, uc.args[1]); 237 + REPORT_GUEST_ASSERT(uc); 239 238 /* NOT REACHED */ 240 239 case UCALL_SYNC: 241 240 break;
+2 -6
tools/testing/selftests/kvm/x86_64/hyperv_features.c
··· 447 447 448 448 switch (get_ucall(vcpu, &uc)) { 449 449 case UCALL_ABORT: 450 - TEST_FAIL("%s at %s:%ld, MSR = %lx, vector = %lx", 451 - (const char *)uc.args[0], __FILE__, 452 - uc.args[1], uc.args[2], uc.args[3]); 450 + REPORT_GUEST_ASSERT_2(uc, "MSR = %lx, vector = %lx"); 453 451 return; 454 452 case UCALL_DONE: 455 453 break; ··· 616 618 617 619 switch (get_ucall(vcpu, &uc)) { 618 620 case UCALL_ABORT: 619 - TEST_FAIL("%s at %s:%ld, arg1 = %lx, arg2 = %lx", 620 - (const char *)uc.args[0], __FILE__, 621 - uc.args[1], uc.args[2], uc.args[3]); 621 + REPORT_GUEST_ASSERT_2(uc, "arg1 = %lx, arg2 = %lx"); 622 622 return; 623 623 case UCALL_DONE: 624 624 break;
+1 -2
tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c
··· 145 145 146 146 switch (get_ucall(vcpu, &uc)) { 147 147 case UCALL_ABORT: 148 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], 149 - __FILE__, uc.args[1]); 148 + REPORT_GUEST_ASSERT(uc); 150 149 /* NOT REACHED */ 151 150 case UCALL_SYNC: 152 151 break;
+1 -2
tools/testing/selftests/kvm/x86_64/kvm_clock_test.c
··· 71 71 72 72 static void handle_abort(struct ucall *uc) 73 73 { 74 - TEST_FAIL("%s at %s:%ld", (const char *)uc->args[0], 75 - __FILE__, uc->args[1]); 74 + REPORT_GUEST_ASSERT(*uc); 76 75 } 77 76 78 77 static void setup_clock(struct kvm_vm *vm, struct test_case *test_case)
+1 -3
tools/testing/selftests/kvm/x86_64/kvm_pv_test.c
··· 137 137 pr_hcall(&uc); 138 138 break; 139 139 case UCALL_ABORT: 140 - TEST_FAIL("%s at %s:%ld, vector = %lu", 141 - (const char *)uc.args[0], __FILE__, 142 - uc.args[1], uc.args[2]); 140 + REPORT_GUEST_ASSERT_1(uc, "vector = %lu"); 143 141 return; 144 142 case UCALL_DONE: 145 143 return;
+1 -3
tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c
··· 100 100 testcase = uc.args[1]; 101 101 break; 102 102 case UCALL_ABORT: 103 - TEST_FAIL("%s at %s:%ld, testcase = %lx, vector = %ld", 104 - (const char *)uc.args[0], __FILE__, 105 - uc.args[1], uc.args[2], uc.args[3]); 103 + REPORT_GUEST_ASSERT_2(uc, "testcase = %lx, vector = %ld"); 106 104 goto done; 107 105 case UCALL_DONE: 108 106 goto done;
+1 -3
tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c
··· 65 65 stage); 66 66 break; 67 67 case UCALL_ABORT: 68 - TEST_ASSERT(false, "%s at %s:%ld\n\tvalues: %#lx, %#lx", 69 - (const char *)uc.args[0], __FILE__, 70 - uc.args[1], uc.args[2], uc.args[3]); 68 + REPORT_GUEST_ASSERT_2(uc, "values: %#lx, %#lx"); 71 69 default: 72 70 TEST_ASSERT(false, "Unexpected exit: %s", 73 71 exit_reason_str(vcpu->run->exit_reason));
+1 -2
tools/testing/selftests/kvm/x86_64/state_test.c
··· 190 190 191 191 switch (get_ucall(vcpu, &uc)) { 192 192 case UCALL_ABORT: 193 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], 194 - __FILE__, uc.args[1]); 193 + REPORT_GUEST_ASSERT(uc); 195 194 /* NOT REACHED */ 196 195 case UCALL_SYNC: 197 196 break;
+1 -1
tools/testing/selftests/kvm/x86_64/svm_int_ctl_test.c
··· 113 113 114 114 switch (get_ucall(vcpu, &uc)) { 115 115 case UCALL_ABORT: 116 - TEST_FAIL("%s", (const char *)uc.args[0]); 116 + REPORT_GUEST_ASSERT(uc); 117 117 break; 118 118 /* NOT REACHED */ 119 119 case UCALL_DONE:
+1 -2
tools/testing/selftests/kvm/x86_64/svm_nested_soft_inject_test.c
··· 181 181 182 182 switch (get_ucall(vcpu, &uc)) { 183 183 case UCALL_ABORT: 184 - TEST_FAIL("%s at %s:%ld, vals = 0x%lx 0x%lx 0x%lx", (const char *)uc.args[0], 185 - __FILE__, uc.args[1], uc.args[2], uc.args[3], uc.args[4]); 184 + REPORT_GUEST_ASSERT_3(uc, "vals = 0x%lx 0x%lx 0x%lx"); 186 185 break; 187 186 /* NOT REACHED */ 188 187 case UCALL_DONE:
+1 -1
tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c
··· 58 58 59 59 switch (get_ucall(vcpu, &uc)) { 60 60 case UCALL_ABORT: 61 - TEST_FAIL("%s", (const char *)uc.args[0]); 61 + REPORT_GUEST_ASSERT(uc); 62 62 /* NOT REACHED */ 63 63 case UCALL_SYNC: 64 64 break;
+1 -1
tools/testing/selftests/kvm/x86_64/triple_fault_event_test.c
··· 82 82 case UCALL_DONE: 83 83 break; 84 84 case UCALL_ABORT: 85 - TEST_FAIL("%s", (const char *)uc.args[0]); 85 + REPORT_GUEST_ASSERT(uc); 86 86 default: 87 87 TEST_FAIL("Unexpected ucall: %lu", uc.cmd); 88 88 }
+1 -3
tools/testing/selftests/kvm/x86_64/tsc_msrs_test.c
··· 79 79 case UCALL_DONE: 80 80 return; 81 81 case UCALL_ABORT: 82 - TEST_ASSERT(false, "%s at %s:%ld\n" \ 83 - "\tvalues: %#lx, %#lx", (const char *)uc.args[0], 84 - __FILE__, uc.args[1], uc.args[2], uc.args[3]); 82 + REPORT_GUEST_ASSERT_2(uc, "values: %#lx, %#lx"); 85 83 default: 86 84 TEST_ASSERT(false, "Unexpected exit: %s", 87 85 exit_reason_str(vcpu->run->exit_reason));
+1 -3
tools/testing/selftests/kvm/x86_64/userspace_io_test.c
··· 98 98 case UCALL_DONE: 99 99 break; 100 100 case UCALL_ABORT: 101 - TEST_FAIL("%s at %s:%ld : argN+1 = 0x%lx, argN+2 = 0x%lx", 102 - (const char *)uc.args[0], __FILE__, uc.args[1], 103 - uc.args[2], uc.args[3]); 101 + REPORT_GUEST_ASSERT_2(uc, "argN+1 = 0x%lx, argN+2 = 0x%lx"); 104 102 default: 105 103 TEST_FAIL("Unknown ucall %lu", uc.cmd); 106 104 }
+2 -3
tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c
··· 400 400 401 401 if (vcpu->run->exit_reason == KVM_EXIT_IO && 402 402 get_ucall(vcpu, &uc) == UCALL_ABORT) { 403 - TEST_FAIL("%s at %s:%ld", 404 - (const char *)uc.args[0], __FILE__, uc.args[1]); 403 + REPORT_GUEST_ASSERT(uc); 405 404 } 406 405 } 407 406 ··· 609 610 610 611 switch (get_ucall(vcpu, &uc)) { 611 612 case UCALL_ABORT: 612 - TEST_FAIL("Guest assertion not met"); 613 + REPORT_GUEST_ASSERT(uc); 613 614 break; 614 615 case UCALL_SYNC: 615 616 vm_ioctl(vcpu->vm, KVM_X86_SET_MSR_FILTER, &no_filter_deny);
+1 -2
tools/testing/selftests/kvm/x86_64/vmx_apic_access_test.c
··· 114 114 115 115 switch (get_ucall(vcpu, &uc)) { 116 116 case UCALL_ABORT: 117 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], 118 - __FILE__, uc.args[1]); 117 + REPORT_GUEST_ASSERT(uc); 119 118 /* NOT REACHED */ 120 119 case UCALL_SYNC: 121 120 apic_access_addr = uc.args[1];
+1 -1
tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c
··· 74 74 75 75 switch (get_ucall(vcpu, &uc)) { 76 76 case UCALL_ABORT: 77 - TEST_FAIL("%s", (const char *)uc.args[0]); 77 + REPORT_GUEST_ASSERT(uc); 78 78 /* NOT REACHED */ 79 79 default: 80 80 TEST_FAIL("Unknown ucall %lu", uc.cmd);
+1 -2
tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c
··· 123 123 124 124 switch (get_ucall(vcpu, &uc)) { 125 125 case UCALL_ABORT: 126 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], 127 - __FILE__, uc.args[1]); 126 + REPORT_GUEST_ASSERT(uc); 128 127 /* NOT REACHED */ 129 128 case UCALL_SYNC: 130 129 /*
+1 -1
tools/testing/selftests/kvm/x86_64/vmx_invalid_nested_guest_state.c
··· 98 98 case UCALL_DONE: 99 99 break; 100 100 case UCALL_ABORT: 101 - TEST_FAIL("%s", (const char *)uc.args[0]); 101 + REPORT_GUEST_ASSERT(uc); 102 102 default: 103 103 TEST_FAIL("Unexpected ucall: %lu", uc.cmd); 104 104 }
+1 -1
tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c
··· 194 194 195 195 switch (get_ucall(vcpu, &uc)) { 196 196 case UCALL_ABORT: 197 - TEST_FAIL("%s", (const char *) uc.args[0]); 197 + REPORT_GUEST_ASSERT(uc); 198 198 case UCALL_SYNC: 199 199 switch (uc.args[0]) { 200 200 case USLEEP:
+1 -2
tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c
··· 189 189 190 190 switch (get_ucall(vcpu, &uc)) { 191 191 case UCALL_ABORT: 192 - TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], 193 - __FILE__, uc.args[1]); 192 + REPORT_GUEST_ASSERT(uc); 194 193 /* NOT REACHED */ 195 194 case UCALL_SYNC: 196 195 break;
+1 -1
tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c
··· 147 147 148 148 switch (get_ucall(vcpu, &uc)) { 149 149 case UCALL_ABORT: 150 - TEST_FAIL("%s", (const char *)uc.args[0]); 150 + REPORT_GUEST_ASSERT(uc); 151 151 /* NOT REACHED */ 152 152 case UCALL_SYNC: 153 153 report(uc.args[1]);
+1 -1
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
··· 542 542 543 543 switch (get_ucall(vcpu, &uc)) { 544 544 case UCALL_ABORT: 545 - TEST_FAIL("%s", (const char *)uc.args[0]); 545 + REPORT_GUEST_ASSERT(uc); 546 546 /* NOT REACHED */ 547 547 case UCALL_SYNC: { 548 548 struct kvm_xen_vcpu_attr rst;
+1 -1
tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c
··· 129 129 130 130 switch (get_ucall(vcpu, &uc)) { 131 131 case UCALL_ABORT: 132 - TEST_FAIL("%s", (const char *)uc.args[0]); 132 + REPORT_GUEST_ASSERT(uc); 133 133 /* NOT REACHED */ 134 134 case UCALL_SYNC: 135 135 break;