summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c
diff options
context:
space:
mode:
authorColton Lewis <coltonlewis@google.com>2022-06-15 22:31:16 +0300
committerSean Christopherson <seanjc@google.com>2022-07-14 04:14:08 +0300
commit594a1c271c159c9c5f0ff2d92ebfda469e94e48d (patch)
treea062ae01bd097faa91247eb8119748b27abbdbd3 /tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c
parentddcb57afd5815191f02aec12f18b4d1bbad5fb9d (diff)
downloadlinux-594a1c271c159c9c5f0ff2d92ebfda469e94e48d.tar.xz
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>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c b/tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c
index ff4644038c55..6bfef77b87b7 100644
--- a/tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c
+++ b/tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c
@@ -194,7 +194,7 @@ int main(int argc, char *argv[])
switch (get_ucall(vcpu, &uc)) {
case UCALL_ABORT:
- TEST_FAIL("%s", (const char *) uc.args[0]);
+ REPORT_GUEST_ASSERT(uc);
case UCALL_SYNC:
switch (uc.args[0]) {
case USLEEP: