Message ID | 20230729003643.1053367-26-seanjc@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C107C001DF for <linux-arm-kernel@archiver.kernel.org>; Sat, 29 Jul 2023 00:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID :References:Mime-Version:In-Reply-To:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eY2CsIvaLYw+51DBxYe5KUnAUcmhnmCDb+nr2cb+x88=; b=w8LnwZb3TY6SeK GbIHnTCuU+5qnZTPbwCd4+clTtdwH+HLkg495MxfZEVlx7IYg0Nxrzy7xbiG6UdQY131uiib39JMn puVS9MHOGXJLvWc6xOuDkIo1UarDAIv1clVRHgPSMCL1dQgS44PF0W+va4/KGu7nBkak/EHiELVf+ kwrcLLzQyLLfUUDbbIeQWysjeW7iLcMMn8v1YkDl5T5QxIc4gNtFj18sj6tqG/n1+LoyBMPJzF7BM NfgTzt2GzdO8ANE6ON+wLrNTKx+iUhtvjCES28GYdgyEK1Bjo8N83/6lTS3BfTiTpoRyD81Pu0F7f NyXBu1t5fnAX8Bs7CUNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qPXyU-005dQz-32; Sat, 29 Jul 2023 00:38:26 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qPXxf-005d08-1m for linux-arm-kernel@lists.infradead.org; Sat, 29 Jul 2023 00:37:37 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-584126c65d1so29145787b3.3 for <linux-arm-kernel@lists.infradead.org>; Fri, 28 Jul 2023 17:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690591054; x=1691195854; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=HaBkctuCpzeNsmYq2ZMyhzuleSw3w1r0yLS5/ARfwFU=; b=0BjQf8mxVqLf9olUxXGMC1K/Q8Umy+UDlIwiZvN5AhzF5GaReKUy2Smdqy+iC5mqmM ddDy5dpIo98KTcMschBba1bUW0oSSa5ow8PFtOdZWlvKFfDHrcvUc/hSjwq40Te0l75V Jeo8+Q6V4F9oYBmvmUeWeDX3lXivT5TjTHwjtbtfK2clS4pfKJuUWfRg4l8sqNbXSV/C G1DPyKNYjO22H4sI7oX2eTOF8JqH+iK8F/uA89XJwOSL2AkvzC/C6/GN8GBo7JvDLMkM CWDHxcTfxWUbMrn4oFs1vnjHlFD3MOa0DBObIs3gjiXioSIH1IiFBp0AUYsF6OdcW031 WYOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591054; x=1691195854; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HaBkctuCpzeNsmYq2ZMyhzuleSw3w1r0yLS5/ARfwFU=; b=feJtpRMmMKzyIPZwQsvsPkQ1j49crpwceOGOMxsjYKH5c+NECHIDgG9LVrBs+PPmsY HKJ2rPGYo8zfZXW7OAWezc727ozMkAgik1mJWBXlBFukPXtdR8ckeynB9jUwvbV681oq 2gbJTbXyUlMZY2t0/GsHldqgVLG4FS5UYepsebUiYtTTF2iZkQTuO830LKF1k54V6uG0 rtL6tXgDw0G2bafSq3t34xF+nzxiG6x/WRLIFIOLsu+2HRgNVgFudjfsxXSEMJO3RKnr GcLpqQm6YDVmenPiJFqEs8GfetmuMmO5ycid3G8qpcw5ChAYOsGaikIQS/Oo5xKfmrPm 9Kng== X-Gm-Message-State: ABy/qLanRWPUYbHGnqfysqcEFHAq0AkciL+J3LnrjEeuFnpXz2Uz4OpO pVMC3tLuiGzmRcMTb5DOp/N9Ab5z3gY= X-Google-Smtp-Source: APBJJlGJseaUzNmHDQp72UkoB0v5EChLeNnkGTMKsOKAgx227d/kK9tEZTDaSnghq3o8QtMG4vQKRKA0Bx0= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a81:ae68:0:b0:577:3b0c:5b85 with SMTP id g40-20020a81ae68000000b005773b0c5b85mr25198ywk.0.1690591054389; Fri, 28 Jul 2023 17:37:34 -0700 (PDT) Date: Fri, 28 Jul 2023 17:36:34 -0700 In-Reply-To: <20230729003643.1053367-1-seanjc@google.com> Mime-Version: 1.0 References: <20230729003643.1053367-1-seanjc@google.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog Message-ID: <20230729003643.1053367-26-seanjc@google.com> Subject: [PATCH v4 25/34] KVM: selftests: Convert x86's nested exceptions test to printf guest asserts From: Sean Christopherson <seanjc@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, Christian Borntraeger <borntraeger@linux.ibm.com>, Janosch Frank <frankja@linux.ibm.com>, Claudio Imbrenda <imbrenda@linux.ibm.com> Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Sean Christopherson <seanjc@google.com>, Thomas Huth <thuth@redhat.com>, " =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= " <philmd@linaro.org>, Aaron Lewis <aaronlewis@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230728_173735_604904_78EB81D1 X-CRM114-Status: GOOD ( 10.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Reply-To: Sean Christopherson <seanjc@google.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: selftests: Guest printf and asserts overhaul
|
expand
|
diff --git a/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c b/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c index 5f074a6da90c..4a29f59a76be 100644 --- a/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c +++ b/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only +#define USE_GUEST_ASSERT_PRINTF 1 + #define _GNU_SOURCE /* for program_invocation_short_name */ #include "test_util.h" @@ -180,9 +182,7 @@ static void assert_ucall_vector(struct kvm_vcpu *vcpu, int vector) "Expected L2 to ask for %d, L2 says it's done", vector); break; case UCALL_ABORT: - TEST_FAIL("%s at %s:%ld (0x%lx != 0x%lx)", - (const char *)uc.args[0], __FILE__, uc.args[1], - uc.args[2], uc.args[3]); + REPORT_GUEST_ASSERT(uc); break; default: TEST_FAIL("Expected L2 to ask for %d, got unexpected ucall %lu", vector, uc.cmd);
Convert x86's nested exceptions test to printf-based guest asserts, and use REPORT_GUEST_ASSERT() instead of TEST_FAIL() so that output is formatted correctly. Signed-off-by: Sean Christopherson <seanjc@google.com> --- tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)