summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/kvm_binary_stats_test.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-02-15 23:09:56 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-11 17:19:56 +0300
commit10825b55b9d5a402294095a3d5fc9d0ea39cc282 (patch)
tree9324862c97c571d9da192724b70578c6a4fa3931 /tools/testing/selftests/kvm/kvm_binary_stats_test.c
parent71ab5a6fea49875290e6ca035ff1d3e3ef3813f7 (diff)
downloadlinux-10825b55b9d5a402294095a3d5fc9d0ea39cc282.tar.xz
KVM: sefltests: Use vm_ioctl() and __vm_ioctl() helpers
Use the recently introduced VM-specific ioctl() helpers instead of open coding calls to ioctl() just to pretty print the ioctl name. Keep a few open coded assertions that provide additional info. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/kvm_binary_stats_test.c')
-rw-r--r--tools/testing/selftests/kvm/kvm_binary_stats_test.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/testing/selftests/kvm/kvm_binary_stats_test.c b/tools/testing/selftests/kvm/kvm_binary_stats_test.c
index bab8b49b52da..0a27b0f85009 100644
--- a/tools/testing/selftests/kvm/kvm_binary_stats_test.c
+++ b/tools/testing/selftests/kvm/kvm_binary_stats_test.c
@@ -165,11 +165,7 @@ static void stats_test(int stats_fd)
static void vm_stats_test(struct kvm_vm *vm)
{
- int stats_fd;
-
- /* Get fd for VM stats */
- stats_fd = vm_get_stats_fd(vm);
- TEST_ASSERT(stats_fd >= 0, "Get VM stats fd");
+ int stats_fd = vm_get_stats_fd(vm);
stats_test(stats_fd);
close(stats_fd);