aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/lib
AgeCommit message (Collapse)AuthorFilesLines
2018-05-30selftests: kvm: return Kselftest Skip code for skipped testsShuah Khan (Samsung OSG)1-2/+7
When kvm test is skipped because of unmet dependencies and/or unsupported configuration, it exits with error which is treated as a fail by the Kselftest framework. This leads to false negative result even when the test could not be run. Change it to return kselftest skip code when a test gets skipped to clearly report that the test could not be run. Change it to use ksft_exit_skip() when the test is skipped. In addition, refine test_assert() message to include strerror() string and add explicit check for EACCES to cleary identify when test doesn't run when access is denied to resources required e.g: open /dev/kvm failed, rc: -1 errno: 13 Signed-off-by: Shuah Khan (Samsung OSG) <[email protected]> Acked-by: Paolo Bonzini <[email protected]> Signed-off-by: Shuah Khan (Samsung OSG) <[email protected]>
2018-05-11KVM: selftests: exit with 0 status code when tests cannot be runPaolo Bonzini1-8/+8
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 <[email protected]>
2018-04-16kvm: selftests: add vmx_tsc_adjust_testPaolo Bonzini2-6/+255
The test checks the behavior of setting MSR_IA32_TSC in a nested guest, and the TSC_OFFSET VMCS field in general. It also introduces the testing infrastructure for Intel nested virtualization. Signed-off-by: Paolo Bonzini <[email protected]>
2018-04-10kvm: selftests: fix spelling mistake: "divisable" and "divisible"Colin Ian King2-3/+3
Trivial fix to spelling mistakes in comment and message text Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
2018-04-04kvm: selftests: add sync_regs_testPaolo Bonzini3-0/+358
This includes the infrastructure to map the test into the guest and run code from the test program inside a VM. Signed-off-by: Ken Hofsass <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
2018-04-04kvm: selftests: add API testing infrastructurePaolo Bonzini5-0/+4418
Testsuite contributed by Google and cleaned up by myself for inclusion in Linux. Signed-off-by: Ken Hofsass <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>