Skip to content
Commit ad5b0727 authored by Oliver Upton's avatar Oliver Upton Committed by Paolo Bonzini
Browse files

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: default avatarOliver Upton <oupton@google.com>
Reviewed-by: default avatarAndrew Jones <andrew.jones@linux.dev>
Message-Id: <20220719143134.3246798-2-oliver.upton@linux.dev>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 31f6e383
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment