summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/test_util.h
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2020-03-13 18:56:44 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-16 19:59:07 +0300
commit94c4b76b88d40f9062dc32ff2fff551ae1791c1e (patch)
tree74487c65682932b2d52df3e1ec5de6684d1a01d8 /tools/testing/selftests/kvm/include/test_util.h
parentbeca54702dc694970dd9727dde59cf5f56c4dbd8 (diff)
downloadlinux-94c4b76b88d40f9062dc32ff2fff551ae1791c1e.tar.xz
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>
Diffstat (limited to 'tools/testing/selftests/kvm/include/test_util.h')
-rw-r--r--tools/testing/selftests/kvm/include/test_util.h1
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 1e1487a30402..f556ec5fe47b 100644
--- a/tools/testing/selftests/kvm/include/test_util.h
+++ b/tools/testing/selftests/kvm/include/test_util.h
@@ -59,5 +59,6 @@ size_t parse_size(const char *size);
int64_t timespec_to_ns(struct timespec ts);
struct timespec timespec_diff(struct timespec start, struct timespec end);
+struct timespec timespec_add_ns(struct timespec ts, int64_t ns);
#endif /* SELFTEST_KVM_TEST_UTIL_H */