linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Ben Horgan <ben.horgan@arm.com>
Cc: catalin.marinas@arm.com, will@kernel.org, maz@kernel.org,
	joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	shuah@kernel.org
Subject: Re: [PATCH 1/3] KVM: arm64: selftests: Count test_guest_reg_read() as a test
Date: Wed, 29 Oct 2025 13:48:24 -0700	[thread overview]
Message-ID: <aQJ9mC5_j6HQ_jbg@linux.dev> (raw)
In-Reply-To: <20251014102108.2442391-2-ben.horgan@arm.com>

On Tue, Oct 14, 2025 at 11:21:06AM +0100, Ben Horgan wrote:
> The test test_guest_reg_read() is run without announcing its presence or
> contributing to the test count. Rectify this.
> 
> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
> ---
>  tools/testing/selftests/kvm/arm64/set_id_regs.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kvm/arm64/set_id_regs.c b/tools/testing/selftests/kvm/arm64/set_id_regs.c
> index 5e24f77868b5..6878ee23310e 100644
> --- a/tools/testing/selftests/kvm/arm64/set_id_regs.c
> +++ b/tools/testing/selftests/kvm/arm64/set_id_regs.c
> @@ -655,6 +655,8 @@ static void test_guest_reg_read(struct kvm_vcpu *vcpu)
>  			TEST_FAIL("Unexpected ucall: %lu", uc.cmd);
>  		}
>  	}
> +
> +	ksft_test_result_pass("%s\n", __func__);
>  }
>  
>  /* Politely lifted from arch/arm64/include/asm/cache.h */
> @@ -786,7 +788,7 @@ int main(void)
>  
>  	ksft_print_header();
>  
> -	test_cnt = 3 + MPAM_IDREG_TEST + MTE_IDREG_TEST;
> +	test_cnt = 4 + MPAM_IDREG_TEST + MTE_IDREG_TEST;

TBH, I'd actually be in favor of a patch that removes usage of the
ksft_* harness from this test altogether. I don't think it adds much and
we use the KVM-specific test assertions anyway.

Thanks,
Oliver


  reply	other threads:[~2025-10-29 20:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 10:21 [PATCH 0/3] set_id_regs cleanup Ben Horgan
2025-10-14 10:21 ` [PATCH 1/3] KVM: arm64: selftests: Count test_guest_reg_read() as a test Ben Horgan
2025-10-29 20:48   ` Oliver Upton [this message]
2025-10-30  9:36     ` Ben Horgan
2025-10-14 10:21 ` [PATCH 2/3] KVM: arm64: selftests: Remove ARM64_FEATURE_FIELD_BITS and its last user Ben Horgan
2025-10-29 20:45   ` Oliver Upton
2025-10-30  9:40     ` Ben Horgan
2025-10-14 10:21 ` [PATCH 3/3] KVM: arm64: selftests: Consider all 7 possible levels of cache Ben Horgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aQJ9mC5_j6HQ_jbg@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=ben.horgan@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=shuah@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).