aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-05-17 11:04:45 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-05-24 21:27:05 +0200
commit319f6f97e3a16c38795168753db8740f77b156c9 (patch)
tree3564c1a1f09ab711948d3f44fc1f94ed14174e7f /tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
parentkvm: selftests: avoid type punning (diff)
downloadlinux-dev-319f6f97e3a16c38795168753db8740f77b156c9.tar.xz
linux-dev-319f6f97e3a16c38795168753db8740f77b156c9.zip
KVM: selftests: Compile code with warnings enabled
So far the KVM selftests are compiled without any compiler warnings enabled. That's quite bad, since we miss a lot of possible bugs this way. Let's enable at least "-Wall" and some other useful warning flags now, and fix at least the trivial problems in the code (like unused variables). Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c b/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
index 7c2c4d4055a8..63cc9c3f5ab6 100644
--- a/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
+++ b/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
@@ -87,6 +87,7 @@ int main(int argc, char *argv[])
while (1) {
rc = _vcpu_run(vm, VCPU_ID);
+ TEST_ASSERT(rc == 0, "vcpu_run failed: %d\n", rc);
TEST_ASSERT(run->exit_reason == KVM_EXIT_IO,
"Unexpected exit reason: %u (%s),\n",
run->exit_reason,