aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-01-17 15:42:03 -0800
committerSean Christopherson <seanjc@google.com>2025-02-12 08:34:56 -0800
commit54108e73344480c3e5f3799129970009f52c59f4 (patch)
tree2b7e0f286c3582d8766db24b4647eb3c93d9d4fb
parentKVM: selftests: Drop the "feature event" param from guest test helpers (diff)
downloadwireguard-linux-54108e73344480c3e5f3799129970009f52c59f4.tar.xz
wireguard-linux-54108e73344480c3e5f3799129970009f52c59f4.zip
KVM: selftests: Print out the actual Top-Down Slots count on failure
Print out the expected vs. actual count of the Top-Down Slots event on failure in the Intel PMU counters test. GUEST_ASSERT() only expands constants/macros, i.e. only prints the value of the expected count, which makes it difficult to debug and triage failures. Link: https://lore.kernel.org/r/20250117234204.2600624-6-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to '')
-rw-r--r--tools/testing/selftests/kvm/x86/pmu_counters_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86/pmu_counters_test.c b/tools/testing/selftests/kvm/x86/pmu_counters_test.c
index ea1485a08c78..8aaaf25b6111 100644
--- a/tools/testing/selftests/kvm/x86/pmu_counters_test.c
+++ b/tools/testing/selftests/kvm/x86/pmu_counters_test.c
@@ -174,7 +174,9 @@ static void guest_assert_event_count(uint8_t idx, uint32_t pmc, uint32_t pmc_msr
GUEST_ASSERT_NE(count, 0);
break;
case INTEL_ARCH_TOPDOWN_SLOTS_INDEX:
- GUEST_ASSERT(count >= NUM_INSNS_RETIRED);
+ __GUEST_ASSERT(count >= NUM_INSNS_RETIRED,
+ "Expected top-down slots >= %u, got count = %lu",
+ NUM_INSNS_RETIRED, count);
break;
default:
break;