OSDN Git Service

KVM: selftests: Introduce steal-time test
authorAndrew Jones <drjones@redhat.com>
Fri, 13 Mar 2020 15:56:44 +0000 (16:56 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Mar 2020 16:59:07 +0000 (17:59 +0100)
commit94c4b76b88d40f9062dc32ff2fff551ae1791c1e
tree74487c65682932b2d52df3e1ec5de6684d1a01d8
parentbeca54702dc694970dd9727dde59cf5f56c4dbd8
KVM: selftests: Introduce steal-time test

The steal-time test confirms what is reported to the guest as stolen
time is consistent with the run_delay reported for the VCPU thread
on the host. Both x86_64 and AArch64 have the concept of steal/stolen
time so this test is introduced for both architectures.

While adding the test we ensure .gitignore has all tests listed
(it was missing s390x/resets) and that the Makefile has all tests
listed in alphabetical order (not really necessary, but it almost
was already...). We also extend the common API with a new num-guest-
pages call and a new timespec call.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/include/test_util.h
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/lib/test_util.c
tools/testing/selftests/kvm/steal_time.c [new file with mode: 0644]