diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-04-18 18:26:45 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-05-11 11:21:12 +0200 |
commit | bcb2b94ae01009db26d1ad0811975405149b14f0 (patch) | |
tree | eb09c4e4e82c2b56e0fc1ba02818b0245a4a420e /tools/testing/selftests/kvm/include | |
parent | 452a68d0ef341c4d544757e02154788227b2a08b (diff) | |
download | talos-obmc-linux-bcb2b94ae01009db26d1ad0811975405149b14f0.tar.gz talos-obmc-linux-bcb2b94ae01009db26d1ad0811975405149b14f0.zip |
KVM: selftests: exit with 0 status code when tests cannot be run
Right now, skipped tests are returning a failure exit code if /dev/kvm does
not exists. Consistently return a zero status code so that various scripts
over the interwebs do not complain. Also return a zero status code if
the KVM_CAP_SYNC_REGS capability is not present, and hardcode in the
test the register kinds that are covered (rather than just using whatever
value of KVM_SYNC_X86_VALID_FIELDS is provided by the kernel headers).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/include')
-rw-r--r-- | tools/testing/selftests/kvm/include/test_util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/test_util.h b/tools/testing/selftests/kvm/include/test_util.h index 7ab98e41324f..ac53730b30aa 100644 --- a/tools/testing/selftests/kvm/include/test_util.h +++ b/tools/testing/selftests/kvm/include/test_util.h @@ -19,6 +19,7 @@ #include <errno.h> #include <unistd.h> #include <fcntl.h> +#include "kselftest.h" ssize_t test_write(int fd, const void *buf, size_t count); ssize_t test_read(int fd, void *buf, size_t count); |