selftests: KVM: Check stat name before other fields
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2119111 commit ad5b0727 Author: Oliver Upton <oupton@google.com> Date: Tue Jul 19 14:31:32 2022 +0000 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> Signed-off-by:
Vitaly Kuznetsov <vkuznets@redhat.com>
Please register or sign in to comment