From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8012BC2D0C2 for ; Fri, 3 Jan 2020 18:10:03 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 059FB2085B for ; Fri, 3 Jan 2020 18:10:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 059FB2085B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4B93C4A52B; Fri, 3 Jan 2020 13:10:02 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a4kaLznv2NJA; Fri, 3 Jan 2020 13:10:01 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 22B1B4A528; Fri, 3 Jan 2020 13:10:01 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 831B74A528 for ; Fri, 3 Jan 2020 13:09:59 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ct8IjfJ55-f1 for ; Fri, 3 Jan 2020 13:09:58 -0500 (EST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4E0F24A36B for ; Fri, 3 Jan 2020 13:09:58 -0500 (EST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D19F71FB; Fri, 3 Jan 2020 10:09:57 -0800 (PST) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5C84B3F703; Fri, 3 Jan 2020 10:09:56 -0800 (PST) Date: Fri, 3 Jan 2020 18:09:46 +0000 From: Andre Przywara To: Eric Auger Subject: Re: [kvm-unit-tests PATCH 02/10] arm: pmu: Let pmu tests take a sub-test parameter Message-ID: <20200103180946.06f3c1c3@donnerap.cambridge.arm.com> In-Reply-To: <20191216204757.4020-3-eric.auger@redhat.com> References: <20191216204757.4020-1-eric.auger@redhat.com> <20191216204757.4020-3-eric.auger@redhat.com> Organization: ARM X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Cc: kvm@vger.kernel.org, maz@kernel.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org, kvmarm@lists.cs.columbia.edu, eric.auger.pro@gmail.com X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Mon, 16 Dec 2019 21:47:49 +0100 Eric Auger wrote: > As we intend to introduce more PMU tests, let's add > a sub-test parameter that will allow to categorize > them. Existing tests are in the cycle-counter category. > > Signed-off-by: Eric Auger Reviewed-by: Andre Przywara Cheers, Andre > --- > arm/pmu.c | 24 +++++++++++++++--------- > arm/unittests.cfg | 7 ++++--- > 2 files changed, 19 insertions(+), 12 deletions(-) > > diff --git a/arm/pmu.c b/arm/pmu.c > index d5a03a6..e5e012d 100644 > --- a/arm/pmu.c > +++ b/arm/pmu.c > @@ -287,22 +287,28 @@ int main(int argc, char *argv[]) > { > int cpi = 0; > > - if (argc > 1) > - cpi = atol(argv[1]); > - > if (!pmu_probe()) { > printf("No PMU found, test skipped...\n"); > return report_summary(); > } > > + if (argc < 2) > + report_abort("no test specified"); > + > report_prefix_push("pmu"); > > - report(check_pmcr(), "Control register"); > - report(check_cycles_increase(), > - "Monotonically increasing cycle count"); > - report(check_cpi(cpi), "Cycle/instruction ratio"); > - > - pmccntr64_test(); > + if (strcmp(argv[1], "cycle-counter") == 0) { > + report_prefix_push(argv[1]); > + if (argc > 2) > + cpi = atol(argv[2]); > + report(check_pmcr(), "Control register"); > + report(check_cycles_increase(), > + "Monotonically increasing cycle count"); > + report(check_cpi(cpi), "Cycle/instruction ratio"); > + pmccntr64_test(); > + } else { > + report_abort("Unknown sub-test '%s'", argv[1]); > + } > > return report_summary(); > } > diff --git a/arm/unittests.cfg b/arm/unittests.cfg > index daeb5a0..79f0d7a 100644 > --- a/arm/unittests.cfg > +++ b/arm/unittests.cfg > @@ -61,21 +61,22 @@ file = pci-test.flat > groups = pci > > # Test PMU support > -[pmu] > +[pmu-cycle-counter] > file = pmu.flat > groups = pmu > +extra_params = -append 'cycle-counter 0' > > # Test PMU support (TCG) with -icount IPC=1 > #[pmu-tcg-icount-1] > #file = pmu.flat > -#extra_params = -icount 0 -append '1' > +#extra_params = -icount 0 -append 'cycle-counter 1' > #groups = pmu > #accel = tcg > > # Test PMU support (TCG) with -icount IPC=256 > #[pmu-tcg-icount-256] > #file = pmu.flat > -#extra_params = -icount 8 -append '256' > +#extra_params = -icount 8 -append 'cycle-counter 256' > #groups = pmu > #accel = tcg > _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm