Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2750899imj; Mon, 11 Feb 2019 07:57:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ3429xtn9dAYcWTibwgpeudCV9ZDXmL+7xi4c64p/J4A7TrmWxSSo7yrlN4fmzWCu6zy0q X-Received: by 2002:aa7:8249:: with SMTP id e9mr24104906pfn.93.1549900666186; Mon, 11 Feb 2019 07:57:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900666; cv=none; d=google.com; s=arc-20160816; b=LP49pi/Abf5OHuNIowZd8vFmiZMha+VBvbvC0i5qm4KpiNybYt9Q4x0mhM9sxum8QX N/6E76xxChcVvZ4xDJt4sJhcmVe/SI8ZwZPdXYTU48myhnZoYI2Klx6/t7mZWbzeVsz+ vJ4nHx153NM0kcke3UiSYXaFTZUgkv/57nU2iaA+j0x63N88mgQBTNW2y2k+TuVo5UKW U1hwsg8s7908DTJjNKEd5DbYsLAkR/iAxb2eCUJwflNm5NzyOsBu1xRQZy3jmPkFapEq M2HvpB585fhAQsebjtHlDTUUm7iCn4oxhdm07mrRMP8XabcVQdvP61XSfIaY1Gkn/7wE rYAg== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wIKTK2MtNNru24JmFClXXGnAAeQsgJ20uljYAybI+QM=; b=mnXCtsTtbaOoxKyFaS7H1TH7oEIqqD7aDB4dYKOkTYnxC5MIrLuiJY17k0j0MGoSqL e/QtG69Op5UQysnBnaQpD642SsBsiZ0Avv1i5fK4D4eOld4qZ2rKL5HA+GTOrvTvS7j5 BYrkZEvYXPbhBtsJYBaGK0ZcBGceEUVQtS4a7L2ZYrx6HHPnYLHGFsBy+TlFePERn5kf LMgdREKLseDrz6XeQ0IFl95r0KECE40vAbqgjsFeNLtCF1YWbUfFvvEHRwjRXMu1cjmt 1rLlTJi6lrxA6mavvKaFwxlLTcdSGevwdY7aYX4xXCgPn7MURK2ZXQ8YRWhgplqGdw5S h9mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0LtCrmAs; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si739824plo.109.2019.02.11.07.57.29; Mon, 11 Feb 2019 07:57:46 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=0LtCrmAs; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730805AbfBKOeQ (ORCPT + 99 others); Mon, 11 Feb 2019 09:34:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:42402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730793AbfBKOeN (ORCPT ); Mon, 11 Feb 2019 09:34:13 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D3A521B18; Mon, 11 Feb 2019 14:34:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895652; bh=azl55dmhvZDrCwpk01h1diQ57+nzg6+5PwBNS8L+mfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0LtCrmAs5339co04I38cSsyLsFSbz2saDysull+MUc18qdjosZTLGV98TbwpvrdgY RJF8/wpyGd0/oz6tVA6/8bEJtXD9NB44g5vJTaepMSzZSe+azOC9klCp5jw6Rp0o/V U2/S6xexNS2S6jrdfK7u2Nr39XpmRN+G9+2ZwUCc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vitaly Kuznetsov , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Sasha Levin Subject: [PATCH 4.20 247/352] selftests: kvm: report failed stage when exit reason is unexpected Date: Mon, 11 Feb 2019 15:17:54 +0100 Message-Id: <20190211141902.841744391@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit b85c32dd27495075380350fcd5d614a6b45311b8 ] When we get a report like ==== Test Assertion Failure ==== x86_64/state_test.c:157: run->exit_reason == KVM_EXIT_IO pid=955 tid=955 - Success 1 0x0000000000401350: main at state_test.c:154 2 0x00007fc31c9e9412: ?? ??:0 3 0x000000000040159d: _start at ??:? Unexpected exit reason: 8 (SHUTDOWN), it is not obvious which particular stage failed. Add the info. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Radim Krčmář Signed-off-by: Sasha Levin --- tools/testing/selftests/kvm/x86_64/evmcs_test.c | 4 ++-- tools/testing/selftests/kvm/x86_64/state_test.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/kvm/x86_64/evmcs_test.c b/tools/testing/selftests/kvm/x86_64/evmcs_test.c index 92c2cfd1b182..ea3c73e8f4f6 100644 --- a/tools/testing/selftests/kvm/x86_64/evmcs_test.c +++ b/tools/testing/selftests/kvm/x86_64/evmcs_test.c @@ -113,8 +113,8 @@ int main(int argc, char *argv[]) for (stage = 1;; stage++) { _vcpu_run(vm, VCPU_ID); TEST_ASSERT(run->exit_reason == KVM_EXIT_IO, - "Unexpected exit reason: %u (%s),\n", - run->exit_reason, + "Stage %d: unexpected exit reason: %u (%s),\n", + stage, run->exit_reason, exit_reason_str(run->exit_reason)); memset(®s1, 0, sizeof(regs1)); diff --git a/tools/testing/selftests/kvm/x86_64/state_test.c b/tools/testing/selftests/kvm/x86_64/state_test.c index 03da41f0f736..4b3f556265f1 100644 --- a/tools/testing/selftests/kvm/x86_64/state_test.c +++ b/tools/testing/selftests/kvm/x86_64/state_test.c @@ -152,8 +152,8 @@ int main(int argc, char *argv[]) for (stage = 1;; stage++) { _vcpu_run(vm, VCPU_ID); TEST_ASSERT(run->exit_reason == KVM_EXIT_IO, - "Unexpected exit reason: %u (%s),\n", - run->exit_reason, + "Stage %d: unexpected exit reason: %u (%s),\n", + stage, run->exit_reason, exit_reason_str(run->exit_reason)); memset(®s1, 0, sizeof(regs1)); -- 2.19.1