KVM: arm64: selftests: get-reg-list: Prepare to run multiple configs at once
authorAndrew Jones <drjones@redhat.com>
Mon, 31 May 2021 10:33:41 +0000 (12:33 +0200)
committerMarc Zyngier <maz@kernel.org>
Tue, 22 Jun 2021 07:51:28 +0000 (08:51 +0100)
commit94e9223c06bece9165a36f0f56bac3552a45cbfc
tree1f364fe8028d3eb5b8783f5d79a5bd36a3c4afdc
parent2f9ace5d4557f8ceea07969d6214c320f5e50c0c
KVM: arm64: selftests: get-reg-list: Prepare to run multiple configs at once

We don't want to have to create a new binary for each vcpu config, so
prepare to run the test for multiple vcpu configs in a single binary.
We do this by factoring out the test from main() and then looping over
configs. When given '--list' we still never print more than a single
reg-list for a single vcpu config though, because it would be confusing
otherwise.

No functional change intended.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210531103344.29325-3-drjones@redhat.com
tools/testing/selftests/kvm/aarch64/get-reg-list.c