diff options
author | Sean Christopherson <seanjc@google.com> | 2022-02-15 12:09:56 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 10:19:56 -0400 |
commit | 10825b55b9d5a402294095a3d5fc9d0ea39cc282 (patch) | |
tree | 9324862c97c571d9da192724b70578c6a4fa3931 /tools/testing/selftests/kvm/kvm_binary_stats_test.c | |
parent | 71ab5a6fea49875290e6ca035ff1d3e3ef3813f7 (diff) |
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.c | 6 |
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); |