Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp156381yba; Mon, 20 May 2019 06:36:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOX6bRYEFx/cs7d9OG+gosfpImcv6uW0i+4RLlQ+Z4WkjfYonLo9Pf0xN4kfj+88tRvmdF X-Received: by 2002:a62:e718:: with SMTP id s24mr80700563pfh.247.1558359373084; Mon, 20 May 2019 06:36:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558359373; cv=none; d=google.com; s=arc-20160816; b=iV0w+eu2qStN+Z98FK+4Vw37ZaJgAASzjtE7jkr+LnePAjwZYbqhg75YHhftF+83m9 2wXmnGiHlOPkhobH+XNVpxCVEM4mdQYHY+U1rHloO6cIDptp5YLi2Ly4p+OVoiweEOX8 tgXQpq1nw9XHqFIsvstwiZImXw8r0vWMRweMSza7/DXibAKI+QeQSgSgVNPrmqCm0/lh XXzIRM4C9MAYGeDewyYY97+mnx4+bQ3ScSwzKibECq2V7YdrqonHZnR9sN/5zGI6ayTC DuqK+ige8gWb/NWjjvsnPcmf9FyrF8XhE/sdW6lDhnreFTfRAwmnGNo0zCi0m8hw8XQe bGtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ntBh3gwN9WoX40GwCBpFxX6GBpRNGTL9y6TfLLH0P8Y=; b=xWgFVj+ZW/SWKy0ybVeC0gT6Q9dM1eBFYuzYjedMo8Rjs+eFF8nlfMN0ez+usz3gpx /J8YH0WI80p+j+dbiFpDZ5CvjKh3gl96/1R6iKR6+IKqKi+VQJwxLmDWWC5D1cR81lz6 2kvt+gR6Wq0rj/EKIlJa+3T+zzckmDB/pwSmdHy+J7x/73L1Af/uf05mxRHngrsVIADe ow1ZB1XPeEGO8FscqsD3omOxL0xmnb6wKoxjJthXhKiaurV7UdgCS9wqP8lGtk2WCuS4 FAgdkwAOtecRT0g08+lIUZtAu3mupw4timFFzojopxQyWG7Zx8LNfpZbWkKyjwb8yvce hatQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si17914835plh.186.2019.05.20.06.35.57; Mon, 20 May 2019 06:36:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732385AbfETKDN (ORCPT + 99 others); Mon, 20 May 2019 06:03:13 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55531 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730733AbfETKDM (ORCPT ); Mon, 20 May 2019 06:03:12 -0400 Received: by mail-wm1-f67.google.com with SMTP id x64so12596909wmb.5 for ; Mon, 20 May 2019 03:03:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ntBh3gwN9WoX40GwCBpFxX6GBpRNGTL9y6TfLLH0P8Y=; b=EY9GGqkkPdY2SrHR0IZwtwz7Kr4sDEuj4PTO1NF6dPRxuirl4NRg+0dIPPdC0AN//D zwwD8UFYnRfUd+rfx8BClmM2oboCQYvioum+jCb5Ps2EZUJBzo3y2Ln48QoCZ/viOyFW aH5ReZAjCSMsbzfsbwX33L7mH/a0XwaRFc5YPFWVOMPXVH+7bwq1hM9mbYfP74OaFN13 FOW5SwCh3Gj6bmKQC2WL3K2Jj/szhjaxAHNqBkbuPshLQQgdY1ERuj7jW1HxECtC4EFx 5DejzKmwNXFyALcyzsR+sp+LJf67fxPOBQP7GuaxANKQ0M17X4LceJJOQ5VgygMxFO2E 0RyQ== X-Gm-Message-State: APjAAAVCPt1HItCyAES68TlucbwhV7P1CAzqIARJZz7OVYf+7Mm5J8fy S0XMTp0Uq1esr95Huvj16L/kKqAKFYI= X-Received: by 2002:a1c:cb0e:: with SMTP id b14mr26501343wmg.61.1558346590407; Mon, 20 May 2019 03:03:10 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:ac04:eef9:b257:b844? ([2001:b07:6468:f312:ac04:eef9:b257:b844]) by smtp.gmail.com with ESMTPSA id g13sm15296462wrw.63.2019.05.20.03.03.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 03:03:09 -0700 (PDT) Subject: Re: [PATCH v2] KVM: selftests: Compile code with warnings enabled To: Thomas Huth , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kselftest@vger.kernel.org, kvm@vger.kernel.org Cc: Shuah Khan , Andrew Jones , Peter Xu , Vitaly Kuznetsov , linux-kernel@vger.kernel.org References: <20190517090445.4502-1-thuth@redhat.com> From: Paolo Bonzini Message-ID: Date: Mon, 20 May 2019 12:03:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190517090445.4502-1-thuth@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/05/19 11:04, Thomas Huth wrote: > 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 > --- > v2: > - Rebased to kvm/queue > - Fix warnings in state_test.c and evmcs_test.c, too > > tools/testing/selftests/kvm/Makefile | 4 +++- > tools/testing/selftests/kvm/dirty_log_test.c | 6 +++++- > tools/testing/selftests/kvm/lib/kvm_util.c | 3 --- > tools/testing/selftests/kvm/lib/x86_64/processor.c | 4 +--- > tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 1 + > tools/testing/selftests/kvm/x86_64/evmcs_test.c | 7 +------ > tools/testing/selftests/kvm/x86_64/platform_info_test.c | 1 - > tools/testing/selftests/kvm/x86_64/smm_test.c | 3 +-- > tools/testing/selftests/kvm/x86_64/state_test.c | 7 +------ > .../selftests/kvm/x86_64/vmx_close_while_nested_test.c | 5 +---- > tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c | 5 ++--- > 11 files changed, 16 insertions(+), 30 deletions(-) Queued, with a squashed fix to kvm_get_supported_hv_cpuid. Paolo