Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1925466rwb; Fri, 28 Jul 2023 18:18:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlEFdYQc35/T3WNtYph4iSRb0jIHs6LM8p8lwHspeqXk58iP6rUdjmQ/ZnAwnErN1So86Cdb X-Received: by 2002:a17:903:1103:b0:1b8:6850:c3c4 with SMTP id n3-20020a170903110300b001b86850c3c4mr3114135plh.22.1690593502319; Fri, 28 Jul 2023 18:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690593502; cv=none; d=google.com; s=arc-20160816; b=u4ZCd3asov96F4KLNxgKVTZC8j2X4gxU20stk9h0UlYZVbOEZa13FCyigUy8C46pe2 HpqIRV2qXCvjVC62CW7SyuGRyUJwKQGXuZlUtxnlo8TVmMXPsjF1/5Ue5RH88qPbVq8d /Uw4dv+yjgVmLW1AHFZWvhmuVELn5Dq1A96Q8FMoExT/etM+JlA0QpWUCvMRbZ54WFiG 4QZrUDt83I2WgE1jAEvR+lEOXLF8PmjdsU6AGGVnl701pCoNtOVoqyxbE43SHrCsYzNJ kQOFwXDLzZR4L4QxueMxtKhNLy3yXgjn0zlpDVHHGWN/HfOtFm/nx+c7DqgeZ+kb0Kad 17Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:reply-to:dkim-signature; bh=HaBkctuCpzeNsmYq2ZMyhzuleSw3w1r0yLS5/ARfwFU=; fh=Ctt0ydInMKwei8YFBFbw7rU4p8H0G/T51ZI/KkO6Md4=; b=eey2hktSBvx0Z3XhXHsz/MF6me71tB+sTp6yAKpfxPGCQtaZYnLHUjGAbnFWt7EETF 0LHC51Sxj6QW4spZPMni9Q00tXmwUt3vLKd0wv5WqX35v9/3kQ1h67AxZOK01rHxP04+ Od2I6M/RqnXC4GtN48yKwgn8Sg9Aov9vra69oXK7XcpTDQeT5QRkxNgj+HWezjinSfds YxOfL3UGWIOpFfiBy3CFSPa0ip29HzfqrzXy7UrvI7WyryQVfDnFzIviVRLg2cy+3Fnc bJ/R4cTzQGrQ3A8VD4xhZ2FgAusHHHjwmuhBQcmJvsiUgu4dN04BTp1Vv0AS8mJpdYo0 e7Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=0BjQf8mx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ev16-20020a17090aead000b00263deaac48esi3918934pjb.8.2023.07.28.18.18.09; Fri, 28 Jul 2023 18:18:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=0BjQf8mx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236595AbjG2Aj6 (ORCPT + 99 others); Fri, 28 Jul 2023 20:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236028AbjG2Ai4 (ORCPT ); Fri, 28 Jul 2023 20:38:56 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3160049EF for ; Fri, 28 Jul 2023 17:38:04 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5704995f964so29133177b3.2 for ; Fri, 28 Jul 2023 17:38:04 -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=FqxSMUzMoYvbjfadZarWmK8bCjeRL9xDD+JVs5KUDXqyJpQr47RanEB8FVpp8nNu/h LbVCfcRYdsY2iApJuAIihXU2ZC53hlBFV0ECnuOoLXwbCqlbQl0JOvmogxdZOz+B0ZUZ ju5PA3ufDHGHKTh8dQFqKltT/Ovq5cy3yoQ0Dc3LPqPrm1CG7n6g7WTgyPg90FXf68c1 /9fUl6FWQT2Hb4Tmth3L1Df7LEsx0CZbyPiqwwm+HdWlHR/RciYW5Ah5R0UQeIIybDco Niw7FlXdfC3SxP/C45SBAqR8lTBi9Mgs0P9CzMc0wvTHSQEWM2LuEe9VjdJcgIMgvywa ls8g== X-Gm-Message-State: ABy/qLY5XeeSl35fm/B5Fu2vU1H8H14+nOFV1y1sydrumWLRCORKJIBR TdVCDLcGxfJE2xHs1zkivNyK0MGAGJ4= 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) Reply-To: Sean Christopherson 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 To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Sean Christopherson , Thomas Huth , "=?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?=" , Aaron Lewis Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.41.0.487.g6d72f3e995-goog