KVM: selftests: exit with 0 status code when tests cannot be run
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Apr 2018 16:26:45 +0000 (18:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 May 2018 09:21:12 +0000 (11:21 +0200)
commitbcb2b94ae01009db26d1ad0811975405149b14f0
treeeb09c4e4e82c2b56e0fc1ba02818b0245a4a420e
parent452a68d0ef341c4d544757e02154788227b2a08b
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>
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/include/test_util.h
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/sync_regs_test.c
tools/testing/selftests/kvm/vmx_tsc_adjust_test.c