diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-09 13:20:53 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 11:46:24 -0400 |
commit | 114eef6e461a6a0810d6ed354b4ce7f3b74fe547 (patch) | |
tree | 7ea84c99833961fa190490f93bcf403dbb49b098 /tools/testing/selftests/kvm/lib | |
parent | KVM: selftests: Split get/set device_attr helpers (diff) | |
download | linux-dev-114eef6e461a6a0810d6ed354b4ce7f3b74fe547.tar.xz linux-dev-114eef6e461a6a0810d6ed354b4ce7f3b74fe547.zip |
KVM: selftests: Dedup vgic_init's asserts and improve error messages
Move the asserts for the many REDIST_REGS accesses into common helpers
instead of copy+pasting the same, unhelpful asserts over and over. Not
providing the actual (or expected) value makes it unnecessarily painful
to debug failures, especially since test_assert() prints the errno
unconditionally, e.g. on success, it may print a stale, misleading errno.
Use kvm_device_attr_get() to handle the "success" check so that the
"success" and "expected == actual" asserts are separated, which will make
it far less likely that a user incorrectly assumes the ioctl() failed.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib')
0 files changed, 0 insertions, 0 deletions