mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
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>
This commit is contained in:
committed by
Paolo Bonzini
parent
6a46fcf92f
commit
d9eaf19ecc
@@ -265,7 +265,7 @@ void kvm_vm_restart(struct kvm_vm *vmp, int perm)
|
||||
TEST_ASSERT(ret == 0, "KVM_SET_USER_MEMORY_REGION IOCTL failed,\n"
|
||||
" rc: %i errno: %i\n"
|
||||
" slot: %u flags: 0x%x\n"
|
||||
" guest_phys_addr: 0x%lx size: 0x%lx",
|
||||
" guest_phys_addr: 0x%llx size: 0x%llx",
|
||||
ret, errno, region->region.slot,
|
||||
region->region.flags,
|
||||
region->region.guest_phys_addr,
|
||||
@@ -280,7 +280,7 @@ void kvm_vm_get_dirty_log(struct kvm_vm *vm, int slot, void *log)
|
||||
|
||||
ret = ioctl(vm->fd, KVM_GET_DIRTY_LOG, &args);
|
||||
TEST_ASSERT(ret == 0, "%s: KVM_GET_DIRTY_LOG failed: %s",
|
||||
strerror(-ret));
|
||||
__func__, strerror(-ret));
|
||||
}
|
||||
|
||||
void kvm_vm_clear_dirty_log(struct kvm_vm *vm, int slot, void *log,
|
||||
@@ -293,7 +293,7 @@ void kvm_vm_clear_dirty_log(struct kvm_vm *vm, int slot, void *log,
|
||||
|
||||
ret = ioctl(vm->fd, KVM_CLEAR_DIRTY_LOG, &args);
|
||||
TEST_ASSERT(ret == 0, "%s: KVM_CLEAR_DIRTY_LOG failed: %s",
|
||||
strerror(-ret));
|
||||
__func__, strerror(-ret));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -785,7 +785,7 @@ void vm_mem_region_move(struct kvm_vm *vm, uint32_t slot, uint64_t new_gpa)
|
||||
ret = ioctl(vm->fd, KVM_SET_USER_MEMORY_REGION, ®ion->region);
|
||||
|
||||
TEST_ASSERT(!ret, "KVM_SET_USER_MEMORY_REGION failed\n"
|
||||
"ret: %i errno: %i slot: %u flags: 0x%x",
|
||||
"ret: %i errno: %i slot: %u flags: 0x%lx",
|
||||
ret, errno, slot, new_gpa);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user