aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/x86_64/evmcs_test.c
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2020-03-10 10:15:55 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-16 17:59:04 +0100
commitd9eaf19ecc12668caf280f3d8e24b22ff5ba716b (patch)
tree81ade0f88a194ae3e7e8a82e2482eaaf9451441b /tools/testing/selftests/kvm/x86_64/evmcs_test.c
parentselftests: KVM: s390: fix format strings for access reg test (diff)
downloadlinux-dev-d9eaf19ecc12668caf280f3d8e24b22ff5ba716b.tar.xz
linux-dev-d9eaf19ecc12668caf280f3d8e24b22ff5ba716b.zip
KVM: selftests: Enable printf format warnings for TEST_ASSERT
Use the format attribute to enable printf format warnings, and then fix them all. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/evmcs_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/evmcs_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/evmcs_test.c b/tools/testing/selftests/kvm/x86_64/evmcs_test.c
index 185226c39c03..464a55217085 100644
--- a/tools/testing/selftests/kvm/x86_64/evmcs_test.c
+++ b/tools/testing/selftests/kvm/x86_64/evmcs_test.c
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
switch (get_ucall(vm, VCPU_ID, &uc)) {
case UCALL_ABORT:
- TEST_ASSERT(false, "%s at %s:%d", (const char *)uc.args[0],
+ TEST_ASSERT(false, "%s at %s:%ld", (const char *)uc.args[0],
__FILE__, uc.args[1]);
/* NOT REACHED */
case UCALL_SYNC:
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
/* UCALL_SYNC is handled here. */
TEST_ASSERT(!strcmp((const char *)uc.args[0], "hello") &&
- uc.args[1] == stage, "Unexpected register values vmexit #%lx, got %lx",
+ uc.args[1] == stage, "Stage %d: Unexpected register values vmexit, got %lx",
stage, (ulong)uc.args[1]);
state = vcpu_save_state(vm, VCPU_ID);