Re: [PATCH 2/4] KVM: selftests: x86: Use TAP interface in the sync_regs test

From: Thomas Huth
Date: Thu Aug 03 2023 - 01:24:57 EST


On 02/08/2023 23.31, Sean Christopherson wrote:
On Wed, Aug 02, 2023, Sean Christopherson wrote:
Oh, and no need to post "KVM: selftests: Rename the ASSERT_EQ macro" in the next
version, I'm planning on grabbing that one straightaway.

After paging this all back in...

I would much prefer that we implement the KVM specific macros[*], e.g. KVM_ONE_VCPU_TEST(),
and build on top of those. I'm definitely ok doing a "slow" conversion, i.e. starting
with a few easy tests. IIRC at some point I said I strongly preferred an all-or-nothing
approach, but realistically I don't think we'll make progress anytime soon if we try to
boil the ocean.

At least I don't have enough spare time to do such a big conversion all at once - I'm only occasionally looking at the KVM selftests, mostly for s390x, and I also lack the knowledge how to test all those x86 tests. So don't expect such a big conversion from me, all I can provide is a small patch here or there.

But I do think we should spend the time to implement the infrastructure right away. We
may end up having to tweak the infrastructure down the road, e.g. to convert other tests,
but I would rather do that then convert some tests twice.

[*] https://lore.kernel.org/all/Y2v+B3xxYKJSM%2FfH@xxxxxxxxxx

Sorry, I somehow completely missed that KVM_ONE_VCPU_TEST suggestion when picking up the series up again after working on other stuff for more than half a year. I'll try to incorporate this into the next version.

(the other patches don't need a fixture, so I think they shouldn't be affected by this?)

Thomas