Message ID | 20230729003643.1053367-16-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 53EACC001DF for <linux-arm-kernel@archiver.kernel.org>; Sat, 29 Jul 2023 00:38:47 +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=iLtZr8H/kf5UHBc0d+gHA8Vw2I4OUZAQ7Ko2/f/bEn4=; b=2WE8aB7ZgPPciy 5WrDXyaqszZFnnONW2lJEqQ0KN/wijZyDgXro+UVx5Gkp8H4ZVc10/GjqjD1WH/hsK247/G6S6Ak/ YZW05kQ/tHNfr47OB5V5cZNTL9FMapdurfzV23+Itd/By9wsyBzpArZ6PLEvotG9x8zD9qU65d2sw mQ+FPmu9vDRVzxWohsB+0ixrudqYrsgkX1P3Ym4YI/Tz7fUo5sWVw5nx+EtzxfwM3ZcbnEtWi427l mpTdlxYaS1207sfxqMU8vxrmYeOUKWKmFSnCWK3jOxZ7/Ts4UgMgU3V0VGHLjpu3y6jbHygIVNRv3 1BRv8C0vdEAmrROSYRnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qPXyP-005dL0-1V; Sat, 29 Jul 2023 00:38:21 +0000 Received: from mail-pl1-x649.google.com ([2607:f8b0:4864:20::649]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qPXxM-005cmc-0x for linux-arm-kernel@lists.infradead.org; Sat, 29 Jul 2023 00:37:17 +0000 Received: by mail-pl1-x649.google.com with SMTP id d9443c01a7336-1bbb34b091dso18317985ad.0 for <linux-arm-kernel@lists.infradead.org>; Fri, 28 Jul 2023 17:37:15 -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=lPuMoJIqZNuj69pfBAlDjd5mG0UFkmW4Fl3IbTAcL8X3UHYI0ZomvJrh9+dP69CCYY nikdJtkvIMvtBZFSfCDwLYsg5jPYa2pEN1M//jjFvPeUiluNZiiD05s8U5koC/pbh2KI nW3O2qOV9P/FsJFIzwinr7U9O0QiOjktv2Uy+NL/4DJes0O1/xmho9jwTkaoROVn6EZR 7oWi05VbChve2lxVjV5Wuz+OG/zJnpSdbK/M12f07MthFK9bgZTa42FiNUDsoC4TkahZ Q3jap/YJE0cOWyEfcGL72oUZD+XlTMLrSKbjsv2EvdBVNfAcVfFA60EdUAOqVVHtEFQJ U4Rw== X-Gm-Message-State: ABy/qLZPdnDvT4ppNbPp6xjb/qgwkNpzYhp7J920RIvksgHrINsY/0Cp OFnMSRKdNXNWbifyVnmV7j3gNUMFhXQ= X-Google-Smtp-Source: APBJJlGy+PARBjAnPL16yx26LNMKVev7tEI0rNgcySfjPv3eElz6XZ45aPg2i/DxTsp7qsC24ybgru6dHtc= 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) 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 <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_173716_333805_03B8635A X-CRM114-Status: GOOD ( 10.54 ) 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/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 <pthread.h> #include <sched.h> #include <semaphore.h> @@ -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; }
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 <seanjc@google.com> --- tools/testing/selftests/kvm/memslot_perf_test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)