diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2024-01-09 15:11:17 +0100 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-02-01 08:58:13 -0800 |
commit | e440c5f2e3e6893aeb39bbba6dd181207840a795 (patch) | |
tree | 35263d862a14f9c0790b1799d6efbbd00a7841a0 /CREDITS | |
parent | c2a449a30fa2b5ddc1dd058e92e047157c9eeb9e (diff) |
KVM: selftests: Generalize check_clocksource() from kvm_clock_test
Several existing x86 selftests need to check that the underlying system
clocksource is TSC or based on TSC but every test implements its own
check. As a first step towards unification, extract check_clocksource()
from kvm_clock_test and split it into two functions: arch-neutral
'sys_get_cur_clocksource()' and x86-specific 'sys_clocksource_is_tsc()'.
Fix a couple of pre-existing issues in kvm_clock_test: memory leakage in
check_clocksource() and using TEST_ASSERT() instead of TEST_REQUIRE().
The change also makes the test fail when system clocksource can't be read
from sysfs.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20240109141121.1619463-2-vkuznets@redhat.com
[sean: eliminate if-elif pattern just to set a bool true]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions