From nobody Mon Feb 9 12:08:04 2026 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEB271DF276 for ; Fri, 17 Jan 2025 23:42:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737157336; cv=none; b=c7dP1kPQpqqWpWRKAxy6V0iDb/MXvaibzBdDXc8N/paH05PYV5Qb+8yEkqQnxyLFFRgUq1/SJgdl0h9e53rKFbFRPJ3dlgRkmuMo8c9wip0S3f/4DUALWPYlPx3vMs3zt6ANpQ24iBmkzVmjKxM88Ft/Hpm2jPrF8TgWDpQNntg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737157336; c=relaxed/simple; bh=DAhep5Ase+lzMS0yxjMlf3nQhuSF+WH7RFRAClM9nmA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=cyhK9ZkihHmdAyRMjGyI/KvV5RGtH8LoK0lB53sKQ40u+qicCGH1ptkqjA4nb2E8umTnmwJbAC5eGFvTPB2XyLGJh5EUTEat9d3rV4aznwnqlBiuC2WxcTcfdw+B4sPZqCl+i7L+Cj4+MNMZSBUqV5BS0cQR7Yyb7ouItrU4OYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=va0eWlAA; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="va0eWlAA" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2162f80040aso47531905ad.1 for ; Fri, 17 Jan 2025 15:42:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737157334; x=1737762134; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=Pxxocry5JF8tR6kff16FhjmhaVcMoVJgF5laflTBa1A=; b=va0eWlAAB30fE2SsWaElGtzOWLGoKezL4arLdK9/Hs2ba6mRz94L7iBkC05jwpnTy/ xyZ21DAPfwM9FgeTf30wQZXivGqQLDHmQpkHBzR7wtgT2vbeEHeth21HF/qd2qidbnKH OlN65K64C0HSJ5Uvg5CWnQmZ8QYq+6DSQ2QcpUU8KkK29Tzm1zuh3djsh2VzWtYGNBK5 K81arHTdwcVJaP3MK6Djxx2nDRlrkXwg+Yc785F9n7CGaWPd7B2Q89h7/sH5ZwVFFm7w kjNFflLxR9sYEYj+UMnJPVNUZi1zDCNPhnRMQKHhHannzGM1Ntm/nJk11jEhZYt7FilL VPZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737157334; x=1737762134; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Pxxocry5JF8tR6kff16FhjmhaVcMoVJgF5laflTBa1A=; b=YWPVV0a3FcCz1imfelJhy8RqsEH3ceb1/Xo8RIu3QdK53BFDqiU3PhU6jXKa7i2aTX aQw7sSb5opxT0cFybWYhafT+3vai4V1Pm2djhYOcdT6mX1024Vl7eJMOMuNUiASpv0XB btS6pbbomRaq6KAiS04TzXFjQbDgxG21BcU51cB+gHBCT+DDOcvA9WZAsLhPLjCX+v7E mZk+qtTDbvI1vWY085+itPRPb0Gmbvtf02dlQCyGsBaukv2bGW0EykO7XIzUXXdqm/I2 H+KdCOK3ZW/rxHbiiIcJSl27NeQykMdUo+ApSC4oI23/O6pk5Ij997Ywm7zY9fB2Ys2o YNNg== X-Forwarded-Encrypted: i=1; AJvYcCWntpcRwL5p5nnhqcf4zB651AhsEHKk7GP3oQ8Vqfz4hSfP7dBfpjnxZaNbX/uU8pxRM18jkxiUgKN3Zog=@vger.kernel.org X-Gm-Message-State: AOJu0Yym+qPmKw2vKLDC5g70X5ptQPa7jj6XcjvZvfGjnK3OnvDtkCLI GChhGdBr45/sKMxTA2uXd6ATTH2so4F1gOW6WpH5gmp5qbuc2b2DAWnkj+3ekjYaP7gQfR5KBpe oHQ== X-Google-Smtp-Source: AGHT+IEaLt2kHxRo8izrrxWWtdVHMGzvIZ9FdNE/IPsW8hD4WzO+hrVwOHBFnStH3DvZx+QCOFX/xnP1GWQ= X-Received: from pfbcg12.prod.google.com ([2002:a05:6a00:290c:b0:72d:b526:23ec]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:928b:b0:72d:8d98:c257 with SMTP id d2e1a72fcca58-72daf930ff5mr6435991b3a.2.1737157334291; Fri, 17 Jan 2025 15:42:14 -0800 (PST) Reply-To: Sean Christopherson Date: Fri, 17 Jan 2025 15:42:03 -0800 In-Reply-To: <20250117234204.2600624-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250117234204.2600624-1-seanjc@google.com> X-Mailer: git-send-email 2.48.0.rc2.279.g1de40edade-goog Message-ID: <20250117234204.2600624-6-seanjc@google.com> Subject: [PATCH 5/5] KVM: selftests: Print out the actual Top-Down Slots count on failure From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/x86/pmu_counters_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/x86/pmu_counters_test.c b/tools/te= sting/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, uint3= 2_t pmc, uint32_t pmc_msr GUEST_ASSERT_NE(count, 0); break; case INTEL_ARCH_TOPDOWN_SLOTS_INDEX: - GUEST_ASSERT(count >=3D NUM_INSNS_RETIRED); + __GUEST_ASSERT(count >=3D NUM_INSNS_RETIRED, + "Expected top-down slots >=3D %u, got count =3D %lu", + NUM_INSNS_RETIRED, count); break; default: break; --=20 2.48.0.rc2.279.g1de40edade-goog