KVM: selftests: Call a dummy helper in VM/vCPU ioctls() to enforce type
authorSean Christopherson <seanjc@google.com>
Mon, 13 Jun 2022 16:19:40 +0000 (16:19 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Jun 2022 16:44:46 +0000 (12:44 -0400)
commitad125f309850b9cf2ba4f39729c5cc827595fac4
treeca8fb7f421b1af37becb90e2c0955a4fb3e3ead5
parent4f48e2e737451365bc81c3b6283036a9079bcc24
KVM: selftests: Call a dummy helper in VM/vCPU ioctls() to enforce type

Replace the goofy static_assert on the size of the @vm/@vcpu parameters
with a call to a dummy helper, i.e. let the compiler naturally complain
about an incompatible type instead of homebrewing a poor replacement.

Reported-by: Andrew Jones <drjones@redhat.com>
Fixes: fcba483e8246 ("KVM: selftests: Sanity check input to ioctls() at build time")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220613161942.1586791-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/kvm_util_base.h