Skip to content

Commit

Permalink
KVM: selftests: Use enum for test numbers in xen_shinfo_test
Browse files Browse the repository at this point in the history
The xen_shinfo_test started off with very few iterations, and the numbers
we used in GUEST_SYNC() were precisely mapped to the RUNSTATE_xxx values
anyway to start with.

It has since grown quite a few more tests, and it's kind of awful to be
handling them all as bare numbers. Especially when I want to add a new
test in the middle. Define an enum for the test stages, and use it both
in the guest code and the host switch statement.

No functional change, if I can count to 24.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230204024151.1373296-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
dwmw2 authored and bonzini committed Mar 14, 2023
1 parent c0c76d9 commit e7062a9
Showing 1 changed file with 82 additions and 51 deletions.
Loading

0 comments on commit e7062a9

Please sign in to comment.