selftests: KVM: Check stat name before other fields
In order to provide more useful test assertions that describe the broken stats descriptor, perform sanity check on the stat name before any other descriptor field. While at it, avoid dereferencing the name field if the sanity check fails as it is more likely to contain garbage. Signed-off-by:Oliver Upton <oupton@google.com> Reviewed-by:
Andrew Jones <andrew.jones@linux.dev> Message-Id: <20220719143134.3246798-2-oliver.upton@linux.dev> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
Please register or sign in to comment