]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: KVM: Fix kvm device helper ioctl assertions
authorOliver Upton <oupton@google.com>
Thu, 16 Sep 2021 18:15:49 +0000 (18:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 Oct 2021 18:43:46 +0000 (14:43 -0400)
commit990448dbae24265c019293f19aa313770b3ce550
tree3bfde646e51b6d60fecfc418f1fda701d7597df1
parent69e23b57a6a5cb74cbaa88b69b23e419b37d17e9
selftests: KVM: Fix kvm device helper ioctl assertions

The KVM_CREATE_DEVICE and KVM_{GET,SET}_DEVICE_ATTR ioctls are defined
to return a value of zero on success. As such, tighten the assertions in
the helper functions to only pass if the return code is zero.

Suggested-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Oliver Upton <oupton@google.com>
Message-Id: <20210916181555.973085-4-oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c