Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1925099rwb; Fri, 28 Jul 2023 18:17:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHnUQ/AvBmDnRCCHFx7tsmGRRTc0Ka+LOt8r26FFL8SgP9Rqqc3v3MeAwjOTAIZHjTIHZG6 X-Received: by 2002:a17:902:d487:b0:1bb:f1d9:432e with SMTP id c7-20020a170902d48700b001bbf1d9432emr2537404plg.37.1690593467731; Fri, 28 Jul 2023 18:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690593467; cv=none; d=google.com; s=arc-20160816; b=M4yeFZODznxnzfCSnNCXpmk/4w/QnnUpjQ2fEP7W15eIfHN/G+ah2vv6VDcESwjTek 3lQtstzC+3+zPtmkWMjybk/lSv4wnO118G4aDMtGcl4C3Hosz3kt/uu9xBwn2AfLrYW2 b3Zc1ii5fw72+56MDTcT0Vgsazw0t55ss3bbWl82V5OzGXhGOVdo5Y5PisVyddMj+xoS WzmJ8cCReaxOMEY+b6SZ241UVvKp7MP46O281w63B5KmXFAenJC7xK6xOONWgTy73VIj 0Z2F8Mi1dcICqvcTeLe0YjoMefLOx+99qU3eWwtBquWIrnDpWPEIXPORYyVeCL+h30px QPfQ== 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=mSgovIDzsK9OZPmvcIO6PrlG0pGNiSzPLHn93Xk6PxY=; fh=Ctt0ydInMKwei8YFBFbw7rU4p8H0G/T51ZI/KkO6Md4=; b=BXftbUc1UVXWzbCD89DX31HkbsYfjx8V2iLAWux/bk40MgjBBlfw6ub9u6GsbJWKYL ywpXLZoR4j0gZLXCJtWVwhfZ27/TVmaF4HGr6eQ2gmJ7gMi7eMJ5NHRMKL9sAo+ZfA0X hhL4OoSaVBtCvvmA5ca4oz7Ke+5y0xvjBfZ4naLq6IytxPDyKEzQuH4ER9zsHDMfeXsx ykRz94glkikIZIxy0s3Aix4k6wlgko9e751viSMBCPMdT6CmGGG8lixEurHIP95tIBzH FVZbuqL7qU+7IQsDmHVdsW0xKjifLFMIN0EKcIPM0zI6VWSom7p/+7f+0akZ6zpKauAD TUEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=BbFY48Qm; 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 j64-20020a638b43000000b00563fcef8e13si3759777pge.107.2023.07.28.18.17.35; Fri, 28 Jul 2023 18:17:47 -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=BbFY48Qm; 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 S236619AbjG2Ai5 (ORCPT + 99 others); Fri, 28 Jul 2023 20:38:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236489AbjG2AiY (ORCPT ); Fri, 28 Jul 2023 20:38:24 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A619E558A for ; Fri, 28 Jul 2023 17:37:34 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id d9443c01a7336-1bbb34b091dso18317995ad.0 for ; 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=1690591035; x=1691195835; 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=mSgovIDzsK9OZPmvcIO6PrlG0pGNiSzPLHn93Xk6PxY=; b=BbFY48Qmp8nvEYwQyB9GRdCa2QWFGF8GOSvEDsRT2X6u6sk5ecNEIIw5pDClILhRPd gRvtNuN3ImdWbXCF4zdd8FaLMJMM1yfDzxm9ActT6o7IL2r/JrzTNkCKHtf9wNe1Gmo3 Tl4rruj0O7W3W3HeWguPLoJRGSnt0u0v1aQ66LzDC8u8FZwW1oWvwxTpJdtFONqeoOxr MyE1evET6xf2Bn4Wij2M2+qzHfPaZBTPWBCljf2z8npAEX9hv3TY+e+9VlxpgDDP4OAh +QNyW6006w+aWT6DBLJmvaDiES4sOf5Luaq+3RtJ/lFNzLcfQ5p0vXcaTRPdDU31coc0 fKdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591035; x=1691195835; 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=mSgovIDzsK9OZPmvcIO6PrlG0pGNiSzPLHn93Xk6PxY=; b=ZwvL+OWDzjb/IexBxSMmwu34sOmBi3ZvnOIFy7Gingue4VKC2j1E3w0GqLnFRdtc/s hhc6riAp/dLgM48dGnP206VruM1gCT5EH5KUAFzb69NwKF9Jn7wuejUYmH2bXCeFNgJd zZzhy0TuxZL56CxPYaPPFXEsJcxYWB5DxuzN6jnrDFvqIeNKqyBG8IWeoDYSuw9RmFjc UmYqwmk3gracXRptBLcU/vWRzYFYguY9ADigF9QzxMrJgp9yAGGiIqMsKeWaOjJrr92G uIjO6ayaa8ibuDPZHn/Yen2EF6kb7N6sbvCMJkDJov16antWhO4t94dM7RrVhMMoc71Z 4DTw== X-Gm-Message-State: ABy/qLamgvBAQDLCuFs8JO0cRezhrdRErDypzfiIqw2Tb8UpKuLiKHoD kgNChzfysrrjIAWKayIftYOppLOGf9g= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:e748:b0:1b5:61d3:dae5 with SMTP id p8-20020a170902e74800b001b561d3dae5mr14204plf.1.1690591035217; Fri, 28 Jul 2023 17:37:15 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 28 Jul 2023 17:36:24 -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-16-seanjc@google.com> Subject: [PATCH v4 15/34] KVM: selftests: Convert the memslot performance 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=unavailable 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 Use the printf-based GUEST_ASSERT_EQ() in the memslot perf test instead of an half-baked open code version. Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/memslot_perf_test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c b/tools/testing/selftests/kvm/memslot_perf_test.c index 4210cd21d159..55f1bc70e571 100644 --- a/tools/testing/selftests/kvm/memslot_perf_test.c +++ b/tools/testing/selftests/kvm/memslot_perf_test.c @@ -6,6 +6,8 @@ * * Basic guest setup / host vCPU thread code lifted from set_memory_region_test. */ +#define USE_GUEST_ASSERT_PRINTF 1 + #include #include #include @@ -157,7 +159,7 @@ static void *vcpu_worker(void *__data) goto done; break; case UCALL_ABORT: - REPORT_GUEST_ASSERT_1(uc, "val = %lu"); + REPORT_GUEST_ASSERT(uc); break; case UCALL_DONE: goto done; @@ -560,7 +562,7 @@ static void guest_code_test_memslot_rw(void) ptr < MEM_TEST_GPA + MEM_TEST_SIZE; ptr += page_size) { uint64_t val = *(uint64_t *)ptr; - GUEST_ASSERT_1(val == MEM_TEST_VAL_2, val); + GUEST_ASSERT_EQ(val, MEM_TEST_VAL_2); *(uint64_t *)ptr = 0; } -- 2.41.0.487.g6d72f3e995-goog