Message ID | 20230729003643.1053367-14-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 7A35AC001DE for <linux-arm-kernel@archiver.kernel.org>; Sat, 29 Jul 2023 00:39:00 +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=CF7f9r3forWqCdHOxKAQIPSg8b1+7d2WWEfycmLnjYA=; b=Bypn6+qxocntMy XUEriY9nTp5nWLu+92bNxvxsbtbVIKWqJ2IPJbanIGEAtxGvGeSvOO9Wama5BIvG5fBe33EZre0ZY qh+7jO0VunxdaihXl/6snBfJ/90CsRRdfwFlGDiHMMPOLwtbnshQup4tI2Ql0n+hN52xLH1RagDAg j7sLrJEOA6LeAMrHkBJ5zkcvheDUeITxT3NEGVKOLqlJBQN0x0s+40BLmfStp8kEh7aWD425bwFg8 sxGZljzhH6SzzFmaCjmbm6Re+tuegl+2zaozGyH3dTao6zs3GZPBM6tO+oHBtW32b/YBZc06F5Rmd uAJXX1/p7WigfNxm78Qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qPXyO-005dK5-1c; Sat, 29 Jul 2023 00:38:20 +0000 Received: from mail-pl1-x64a.google.com ([2607:f8b0:4864:20::64a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qPXxI-005ckI-28 for linux-arm-kernel@lists.infradead.org; Sat, 29 Jul 2023 00:37:13 +0000 Received: by mail-pl1-x64a.google.com with SMTP id d9443c01a7336-1bba7a32a40so20261625ad.0 for <linux-arm-kernel@lists.infradead.org>; Fri, 28 Jul 2023 17:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690591031; x=1691195831; 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=KD9spraMrgRbnmBjQZZWWeob8eAugC00F4y37YTJw8E=; b=UUiGz//H+qc2VwnDcG3ap61DCiEkgcxxTwTq2PlVRzkYDYvNYeUh70lnLWpXCBXw1y ENjvzo412y0u8RsVpXc3xycSaaXoHpRTF5UONPFZsGShWgI3pIRhTRunNJJuTQ1A9uhm mnqIecy31B8Hjk0rRk237/9BlpMmLswr75hM4zTSsGCta9eHugEBieSA56LlrpFKmd6W Q7Mgfwj67nXcEUg6f552ziM8vdP6tqceVJ6jlczrAq7yuwAswE/dDCGV67Oc/x9uOuhf HdMr387q9wwaQ/lM9O6Fz189JQIUM7qwFKdn09iNwVvjAI88wPw698F9vdkbtGf62tCA svIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591031; x=1691195831; 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=KD9spraMrgRbnmBjQZZWWeob8eAugC00F4y37YTJw8E=; b=hUDoKANcodcY3z084haUzG//lGRNzM+QBQ0cRnjbun6YlxHSE90xWVHruCOO19L4IY uTR+AtAw55fnXOI3pgPQw9JyrZIxAzgT/KQLLQGu0DYNKGP7B94/2YJZuQXJDKwOnC/P yA2L/v4oCiP9mWeY7ioD+jnA4bl3eADmGZmidTz3A8/XmIibuES+E6QelMbIYfgNYv1d 8lmr2o0dXMM9CdjbjE2RPYCqinNfgl8Zu5WcvcyJ2bhtmnhyV3MavtxJDt7RYOUpt50J /8Ar/qCx+yM6Ir/aLK3W8I64M4jzT9385DUvvepAtkrP9F+HLN3snYzso5kx9x2eZFZf H/BQ== X-Gm-Message-State: ABy/qLaIKuzl5dvvGtywVHpzW5m4VGQCTbahWmQ4F4EIZPW3K7HFINJN jikHEt18592CxjikRcmHfXceEjAIE9w= X-Google-Smtp-Source: APBJJlGFWjvsj2ItznxzdDVqa8pRyuCQsd04GIbUfTSMt0KhlWzf3EhqdNhW+0vnUSXgK5Kxd8db4hT3FWo= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:e5c1:b0:1b8:8c7:31e6 with SMTP id u1-20020a170902e5c100b001b808c731e6mr14017plf.1.1690591030967; Fri, 28 Jul 2023 17:37:10 -0700 (PDT) Date: Fri, 28 Jul 2023 17:36:22 -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-14-seanjc@google.com> Subject: [PATCH v4 13/34] KVM: selftests: Convert ARM's page fault test to printf style GUEST_ASSERT 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_173712_698549_E2E1C4DB X-CRM114-Status: GOOD ( 10.01 ) 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/aarch64/page_fault_test.c b/tools/testing/selftests/kvm/aarch64/page_fault_test.c index e5bb8767d2cb..0b0dd90feae5 100644 --- a/tools/testing/selftests/kvm/aarch64/page_fault_test.c +++ b/tools/testing/selftests/kvm/aarch64/page_fault_test.c @@ -7,6 +7,7 @@ * hugetlbfs with a hole). It checks that the expected handling method is * called (e.g., uffd faults with the right address and write/read flag). */ +#define USE_GUEST_ASSERT_PRINTF 1 #define _GNU_SOURCE #include <linux/bitmap.h> @@ -293,12 +294,12 @@ static void guest_code(struct test_desc *test) static void no_dabt_handler(struct ex_regs *regs) { - GUEST_ASSERT_1(false, read_sysreg(far_el1)); + GUEST_FAIL("Unexpected dabt, far_el1 = 0x%llx", read_sysreg(far_el1)); } static void no_iabt_handler(struct ex_regs *regs) { - GUEST_ASSERT_1(false, regs->pc); + GUEST_FAIL("Unexpected iabt, pc = 0x%lx", regs->pc); } static struct uffd_args { @@ -679,7 +680,7 @@ static void vcpu_run_loop(struct kvm_vm *vm, struct kvm_vcpu *vcpu, } break; case UCALL_ABORT: - REPORT_GUEST_ASSERT_2(uc, "values: %#lx, %#lx"); + REPORT_GUEST_ASSERT(uc); break; case UCALL_DONE: goto done;
Use GUEST_FAIL() in ARM's page fault test to report unexpected faults. Signed-off-by: Sean Christopherson <seanjc@google.com> --- tools/testing/selftests/kvm/aarch64/page_fault_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)