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)
commitc1901feef5bbe87713815ad0eff6331ae7225973
tree3bfde646e51b6d60fecfc418f1fda701d7597df1
parent61fb1c54853dda9a95b785f36220fa8ff39bac20
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