Message ID | 20240212210932.3095265-2-oliver.upton@linux.dev |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-62370-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp170344dyb; Mon, 12 Feb 2024 13:11:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWKIq32P1iye3UPrb9mmnVtJsh9bTVOvy5V1m536x7u/ZSlFn7eKNkMxUlIBwc8vKQ+9B1Ys6Nu08afOdFK/OtxHRmfVg== X-Google-Smtp-Source: AGHT+IF9tUa21qP0UGctJtChWVfOUsGDyMKq33WNc6HuU8F6dHLanSfV6h/oa1SOAI/50snZnk5W X-Received: by 2002:a17:903:110f:b0:1d8:a93f:a5b2 with SMTP id n15-20020a170903110f00b001d8a93fa5b2mr8627047plh.12.1707772316591; Mon, 12 Feb 2024 13:11:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707772316; cv=pass; d=google.com; s=arc-20160816; b=fXIr2ci9rsEjgAVghV/wUA2ExCMOM72XSOiaUSLrP4EcTMNhO4Wyhu8smDPQEZwhN5 yc8LbucZrb7+gvetYYOMFwY1LXZR6RPIMXAFRkrlMC+5+MbekEQkMEtQha2O1MlUJi0p 4h3cTmRITkwB541pFidpB4HbJIsG2s8Dsa5xQ92yu0CfwQkfbE7DqtMstkayzKOUmGjv iXftaHbaazdDu3EoIsAitXE4/Z7sYpD1WdkfdHVMaIb/OwP62IspLUH9tSs1yrUKw5ZV eZFbvx5MeU6Vl1GrsWsKcI3HIm9Yu7X2C9GsU6rRxzn+udqXeLf9PScMtImpav84lhlt viEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ho2ychX5rzcZXGqMft5IUPj+UTWREdBWn8Koftkvhk0=; fh=DaUvW61EAiQteUPfILqV06CEaNK2LPQIRJEgZg8UNcI=; b=QsmuyufcD2i5f+BCnYRKxdn/spRRHmAq4j17bICQeRvq78Cn4SLCZPI12F08a7FUCJ 3g2A0+UGJH+P2IBJ7e0dPFoPjAog00WwPu7KLOQ6g11FxOk1If+HdZKEErU/Rb+fvL2X WW72aW9H/ZD40rX9Hvji8j7xtP64gVFqlsb2Q4Yat5H2oNAuiV34f0kbKpwgmS1FsBPq Si/WPK0FqqFKT0NfwtSqtHAkA2J20BrCLPhftLyA2U2OVYx68WeC6jrjrFx0hEa8Rll0 Rdg7dGcHFVN7rwTD/gpNrEBEcYFTpz07WY5LvLwPG8XNcwGx57etZXN2Bao7Z2n0tPuQ 6q9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=d9ei9th8; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-62370-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62370-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=2; AJvYcCU+dbX+f606uiqMKZ8h8986ieFJUybdHPxYu/fhY0XZEp18v4Ni+/+JMKrEzCSbojM9JuAM2zo0cY8QdiJOL56jS7RfUg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c4-20020a170903234400b001d8f24096f5si805507plh.110.2024.02.12.13.11.56 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 13:11:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62370-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=d9ei9th8; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-62370-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62370-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4AD6DB22970 for <ouuuleilei@gmail.com>; Mon, 12 Feb 2024 21:10:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07CB14CB55; Mon, 12 Feb 2024 21:10:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="d9ei9th8" Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D73CF4BA88 for <linux-kernel@vger.kernel.org>; Mon, 12 Feb 2024 21:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707772212; cv=none; b=t8cB9LiSXKpa1jkosnrLLNljDBEIyH27l1q9MF1mKrYPbqnZhC0YaGi4w26a6TUjxNUpqY0vZtRHnrgut5WKHwiS0sbe4xpNZ5RtWa68OMTAVjHqArlE0X0MBVlr8hMVMco+iZ/0eNlxZWDMS9qUxVJyuc0IrvEu+GRnGGzlkIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707772212; c=relaxed/simple; bh=V2K3Tqa8gFu4PA1KW3ElYY3Gm+CaB0UlpxRc/Dm88V4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lQzgejQbUGrF5cHgkTWQpIWOCPE1You5otRpQloRoN2UPnFKFyTh1Og+IxdQkIsEXHceEtzwK9YPs+tp0SfBqlzJzKDTmywUEFaX6FtFpICBkk4MuREqToPw9uWwk9oF8QGPWwuqmCYvBcxvXtjDTeoMBt12cf9EMcm7g9wNh0g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=d9ei9th8; arc=none smtp.client-ip=95.215.58.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1707772207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ho2ychX5rzcZXGqMft5IUPj+UTWREdBWn8Koftkvhk0=; b=d9ei9th8fcogKE0TDUvOgUz6IIwo3rQmVdChHOVKeZ0S1+n3rZ3FgUStc9VVsDUEbJD1R0 QoYZvxKJJftGdkfCirawYzO+KT4wFkeMK6+LPwuPxr53YfunovI0mDgz94yL2bPbkItKAU SVfmES5t3kgv86WmHRXSt1oGwe5f5kY= From: Oliver Upton <oliver.upton@linux.dev> To: kvmarm@lists.linux.dev Cc: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Zenghui Yu <yuzenghui@huawei.com>, Raghavendra Rao Ananta <rananta@google.com>, linux-kernel@vger.kernel.org, Oliver Upton <oliver.upton@linux.dev> Subject: [PATCH] KVM: selftests: Print timer ctl register in ISTATUS assertion Date: Mon, 12 Feb 2024 21:09:33 +0000 Message-ID: <20240212210932.3095265-2-oliver.upton@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790729064313823445 X-GMAIL-MSGID: 1790729064313823445 |
Series |
KVM: selftests: Print timer ctl register in ISTATUS assertion
|
|
Commit Message
Oliver Upton
Feb. 12, 2024, 9:09 p.m. UTC
Zenghui noted that the test assertion for the ISTATUS bit is printing
the current timer value instead of the control register in the case of
failure. While the assertion is sound, printing CNT isn't informative.
Change things around to actually print the CTL register value instead.
Reported-by: Zenghui Yu <yuzenghui@huawei.com>
Closes: https://lore.kernel.org/kvmarm/3188e6f1-f150-f7d0-6c2b-5b7608b0b012@huawei.com/
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
---
Applies to kvmarm/next.
tools/testing/selftests/kvm/aarch64/arch_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: 680f749c272378a796388a3244bab53b5a952d67
Comments
On 2024/2/13 05:09, Oliver Upton wrote: > Zenghui noted that the test assertion for the ISTATUS bit is printing > the current timer value instead of the control register in the case of > failure. While the assertion is sound, printing CNT isn't informative. > > Change things around to actually print the CTL register value instead. > > Reported-by: Zenghui Yu <yuzenghui@huawei.com> > Closes: https://lore.kernel.org/kvmarm/3188e6f1-f150-f7d0-6c2b-5b7608b0b012@huawei.com/ > Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Reviewed-by: Zenghui Yu <zenghui.yu@linux.dev>
On Mon, 12 Feb 2024 21:09:33 +0000, Oliver Upton wrote: > Zenghui noted that the test assertion for the ISTATUS bit is printing > the current timer value instead of the control register in the case of > failure. While the assertion is sound, printing CNT isn't informative. > > Change things around to actually print the CTL register value instead. > > > [...] Applied to kvmarm/next, thanks! [1/1] KVM: selftests: Print timer ctl register in ISTATUS assertion https://git.kernel.org/kvmarm/kvmarm/c/8cdc71fbf655 -- Best, Oliver
diff --git a/tools/testing/selftests/kvm/aarch64/arch_timer.c b/tools/testing/selftests/kvm/aarch64/arch_timer.c index d5e8f365aa01..ab4b604d8ec0 100644 --- a/tools/testing/selftests/kvm/aarch64/arch_timer.c +++ b/tools/testing/selftests/kvm/aarch64/arch_timer.c @@ -160,7 +160,7 @@ static void guest_validate_irq(unsigned int intid, __GUEST_ASSERT(xcnt >= cval, "xcnt = 0x%lx, cval = 0x%lx, xcnt_diff_us = 0x%lx", xcnt, cval, xcnt_diff_us); - __GUEST_ASSERT(xctl & CTL_ISTATUS, "xcnt = 0x%lx", xcnt); + __GUEST_ASSERT(xctl & CTL_ISTATUS, "xctl = 0x%lx", xctl); WRITE_ONCE(shared_data->nr_iter, shared_data->nr_iter + 1); }