mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
selftests: kvm: add _vm_ioctl
As in kvm_ioctl and _kvm_ioctl, add the respective _vm_ioctl for vm_ioctl. _vm_ioctl invokes an ioctl using the vm fd, leaving the caller to test the result. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Message-Id: <20210318151624.490861-1-eesposit@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
77a3aa26a0
commit
e2c12909ae
@@ -134,6 +134,7 @@ void vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
|
|||||||
int _vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
|
int _vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
|
||||||
void *arg);
|
void *arg);
|
||||||
void vm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
|
void vm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
|
||||||
|
int _vm_ioctl(struct kvm_vm *vm, unsigned long cmd, void *arg);
|
||||||
void kvm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
|
void kvm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
|
||||||
int _kvm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
|
int _kvm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
|
||||||
void vm_mem_region_set_flags(struct kvm_vm *vm, uint32_t slot, uint32_t flags);
|
void vm_mem_region_set_flags(struct kvm_vm *vm, uint32_t slot, uint32_t flags);
|
||||||
|
@@ -1697,11 +1697,16 @@ void vm_ioctl(struct kvm_vm *vm, unsigned long cmd, void *arg)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = ioctl(vm->fd, cmd, arg);
|
ret = _vm_ioctl(vm, cmd, arg);
|
||||||
TEST_ASSERT(ret == 0, "vm ioctl %lu failed, rc: %i errno: %i (%s)",
|
TEST_ASSERT(ret == 0, "vm ioctl %lu failed, rc: %i errno: %i (%s)",
|
||||||
cmd, ret, errno, strerror(errno));
|
cmd, ret, errno, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int _vm_ioctl(struct kvm_vm *vm, unsigned long cmd, void *arg)
|
||||||
|
{
|
||||||
|
return ioctl(vm->fd, cmd, arg);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* KVM system ioctl
|
* KVM system ioctl
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user