KVM: selftests: Refactor stable TSC check to use TEST_REQUIRE()
authorSean Christopherson <seanjc@google.com>
Thu, 6 Apr 2023 00:17:24 +0000 (17:17 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 30 May 2023 22:03:02 +0000 (15:03 -0700)
commit5efde6d73d58ec1ba6e22cc0cbc89fbdb38e632c
treea756dd0d947a5eb8bdaa46bf92071cc4b8d5db6a
parentb9846a698c9aff4eb2214a06ac83638ad098f33f
KVM: selftests: Refactor stable TSC check to use TEST_REQUIRE()

Refactor the nested TSC scaling test's check on a stable system TSC to
use TEST_REQUIRE() to do the heavy lifting when the system doesn't have
a stable TSC.  Using a helper+TEST_REQUIRE() eliminates the need for
gotos and a custom message.

Cc: Hao Ge <gehao@kylinos.cn>
Cc: Vipin Sharma <vipinsh@google.com>
Link: https://lore.kernel.org/r/20230406001724.706668-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c