• Sean Christopherson's avatar
    KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste · 7ed397d1
    Sean Christopherson authored
    Add TEST_REQUIRE() and __TEST_REQUIRE() to replace the myriad open coded
    instances of selftests exiting with KSFT_SKIP after printing an
    informational message.  In addition to reducing the amount of boilerplate
    code in selftests, the UPPERCASE macro names make it easier to visually
    identify a test's requirements.
    
    Convert usage that erroneously uses something other than print_skip()
    and/or "exits" with '0' or some other non-KSFT_SKIP value.
    
    Intentionally drop a kvm_vm_free() in aarch64/debug-exceptions.c as part
    of the conversion.  All memory and file descriptors are freed on process
    exit, so the explicit free is superfluous.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    7ed397d1
tsc_scaling_sync.c 2.7 KB