kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu
Cc: maz@kernel.org, ricarkol@google.com, eric.auger@redhat.com,
	alexandru.elisei@arm.com, pbonzini@redhat.com
Subject: Re: [PATCH 4/6] KVM: arm64: selftests: get-reg-list: Provide config selection option
Date: Mon, 10 May 2021 08:40:48 +0200	[thread overview]
Message-ID: <20210510064048.m7ezciiratbesqjj@gator> (raw)
In-Reply-To: <20210507200416.198055-5-drjones@redhat.com>

On Fri, May 07, 2021 at 10:04:14PM +0200, Andrew Jones wrote:
> Add a new command line option that allows the user to select a specific
> configuration, e.g. --config:sve will give the sve config. Also provide
> help text and the --help/-h options.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  .../selftests/kvm/aarch64/get-reg-list.c      | 76 +++++++++++++++++--
>  1 file changed, 70 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/testing/selftests/kvm/aarch64/get-reg-list.c b/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> index 68d3be86d490..f5e122b6b257 100644
> --- a/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> +++ b/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> @@ -38,6 +38,17 @@
>  #define reg_list_sve() (false)
>  #endif
>  
> +enum {
> +	VREGS,
> +	SVE,
> +};
> +
> +static char * const vcpu_config_names[] = {
> +	[VREGS] = "vregs",
> +	[SVE] = "sve",
> +	NULL
> +};
> +
>  static struct kvm_reg_list *reg_list;
>  static __u64 *blessed_reg, blessed_n;
>  
> @@ -502,34 +513,87 @@ static void run_test(struct vcpu_config *c)
>  	kvm_vm_free(vm);
>  }
>  
> +static void help(void)
> +{
> +	char * const *n;
> +
> +	printf(
> +	"\n"
> +	"usage: get-reg-list [--config:<selection>[,<selection>...]] [--list] [--list-filtered] [--core-reg-fixup]\n\n"
> +	" --config:<selection>[,<selection>...] Used to select a specific vcpu configuration for the test/listing\n"

I just realized I left this <selection>[,<selection>...] help text and
some other kruft, like the vcpu_config_names[] array, from a different
design I scrapped. That design, which used getsubopt(), was more
complicated than it was worth.

I'll send a v2 to get this cleaned up, but I'll wait a day or so first
for more comments.

Thanks,
drew


  reply	other threads:[~2021-05-10  6:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 20:04 [PATCH 0/6] KVM: arm64: selftests: Fix get-reg-list Andrew Jones
2021-05-07 20:04 ` [PATCH 1/6] KVM: arm64: selftests: get-reg-list: Factor out printing Andrew Jones
2021-05-07 20:04 ` [PATCH 2/6] KVM: arm64: selftests: get-reg-list: Introduce vcpu configs Andrew Jones
2021-05-07 20:04 ` [PATCH 3/6] KVM: arm64: selftests: get-reg-list: Prepare to run multiple configs at once Andrew Jones
2021-05-07 20:04 ` [PATCH 4/6] KVM: arm64: selftests: get-reg-list: Provide config selection option Andrew Jones
2021-05-10  6:40   ` Andrew Jones [this message]
2021-05-07 20:04 ` [PATCH 5/6] KVM: arm64: selftests: get-reg-list: Remove get-reg-list-sve Andrew Jones
2021-05-07 20:04 ` [PATCH 6/6] KVM: arm64: selftests: get-reg-list: Split base and pmu registers Andrew Jones

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=20210510064048.m7ezciiratbesqjj@gator \
    --to=drjones@redhat.com \
    --cc=alexandru.elisei@arm.com \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=maz@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=ricarkol@google.com \
    --subject='Re: [PATCH 4/6] KVM: arm64: selftests: get-reg-list: Provide config selection option' \
    /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

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).