diff options
author | Sean Christopherson <seanjc@google.com> | 2022-02-15 11:05:21 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 10:15:23 -0400 |
commit | ffb7c77fd5039a01b2534465a2cdf7514f7fc9df (patch) | |
tree | 61b940c3ad29930712ed0414a8c54e240c554317 /tools/testing/selftests/kvm/kvm_binary_stats_test.c | |
parent | 1d438b3bc25e7ea2e7af95b9c07d88a287346df1 (diff) |
KVM: sefltests: Use vcpu_ioctl() and __vcpu_ioctl() helpers
Use the recently introduced vCPU-specific ioctl() helpers instead of
open coding calls to ioctl() just to pretty print the ioctl name.
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 4b149b383678..bab8b49b52da 100644 --- a/tools/testing/selftests/kvm/kvm_binary_stats_test.c +++ b/tools/testing/selftests/kvm/kvm_binary_stats_test.c @@ -178,11 +178,7 @@ static void vm_stats_test(struct kvm_vm *vm) static void vcpu_stats_test(struct kvm_vm *vm, int vcpu_id) { - int stats_fd; - - /* Get fd for VCPU stats */ - stats_fd = vcpu_get_stats_fd(vm, vcpu_id); - TEST_ASSERT(stats_fd >= 0, "Get VCPU stats fd"); + int stats_fd = vcpu_get_stats_fd(vm, vcpu_id); stats_test(stats_fd); close(stats_fd); |