selftests: KVM: Provide descriptive assertions in kvm_binary_stats_test
authorOliver Upton <oupton@google.com>
Tue, 19 Jul 2022 14:31:33 +0000 (14:31 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Aug 2022 12:01:22 +0000 (08:01 -0400)
commit7eebae78bc9754564779927976f37d04c2c01b64
treeaff87f5e10f9c9aba9400090b583b5f18c914920
parentad5b072716e9ea7164b578a06c615966e9203c45
selftests: KVM: Provide descriptive assertions in kvm_binary_stats_test

As it turns out, tests sometimes fail. When that is the case, packing
the test assertion with as much relevant information helps track down
the problem more quickly.

Sharpen up the stat descriptor assertions in kvm_binary_stats_test to
more precisely describe the reason for the test assertion and which
stat is to blame.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Message-Id: <20220719143134.3246798-3-oliver.upton@linux.dev>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/kvm_binary_stats_test.c