KVM: selftests: Rework timespec functions and usage
authorAndrew Jones <drjones@redhat.com>
Mon, 16 Mar 2020 17:37:03 +0000 (18:37 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Mar 2020 13:08:56 +0000 (14:08 +0100)
commitbfcaa84975fa0c75deca3e997533aaa35ffed12b
tree43be2463bbd76e3fdfc167b1aeca17ba5e4ed15a
parentcf6c26ec7bf5386706cd6522708766eb6522995e
KVM: selftests: Rework timespec functions and usage

The steal_time test's timespec stop condition was wrong and should have
used the timespec functions instead to avoid being wrong, but
timespec_diff had a strange interface. Rework all the timespec API and
its use.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/demand_paging_test.c
tools/testing/selftests/kvm/include/test_util.h
tools/testing/selftests/kvm/lib/test_util.c
tools/testing/selftests/kvm/steal_time.c