Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18DA3C05027 for ; Fri, 3 Feb 2023 20:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233373AbjBCUPh (ORCPT ); Fri, 3 Feb 2023 15:15:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbjBCUPf (ORCPT ); Fri, 3 Feb 2023 15:15:35 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8F8891882; Fri, 3 Feb 2023 12:15:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5F6B6B82BB2; Fri, 3 Feb 2023 20:15:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB01AC433D2; Fri, 3 Feb 2023 20:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675455332; bh=3wRIsEkcYgnxR1oUaUKFTnjvlPLYKjDerxB/b+desAU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XNrPSl5X5PzDmjlWqVQxEf/PMr/4ad/lJjFiZ6RNo5iwLeo+5hLoltqMLjhtHFFw6 qQQlqqvcLDoIoDCaBqkP6r9mhyYAH3LHCraBq0fiARVl8x5oRUEL3YpoAOoAR04XF4 hpCOTi2f+OgVUr3mHrZIl5vInJdziv28q6CYJdz/AdSq+jlUlFLQ0O0WWwUFWHYugQ erEHNa7QPVdrTZHJSa72QYsUV/SvJYa3dOE7lY45VVXMOoSvKudhFEzc8SFH0oz/0x anhhPBjyETEGVTuu/MXVpxJbSSBJs8F/BYYaEwtoUtLewLzX7phfFxmnaSYa5M9FOC JgDZ9BCDXyt+A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 35877405BE; Fri, 3 Feb 2023 17:15:29 -0300 (-03) Date: Fri, 3 Feb 2023 17:15:29 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Kim Phillips , Florian Fischer , Ravi Bangoria , Xing Zhengjun , Rob Herring , Kang Minchul , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Sandipan Das , Jing Zhang , linuxppc-dev@lists.ozlabs.org, Kajol Jain , Stephane Eranian , Perry Taylor , Caleb Biggers Subject: Re: [PATCH v5 15/15] perf jevents: Run metric_test.py at compile-time Message-ID: References: <20230126233645.200509-1-irogers@google.com> <20230126233645.200509-16-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230126233645.200509-16-irogers@google.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jan 26, 2023 at 03:36:45PM -0800, Ian Rogers escreveu: > Add a target that generates a log file for running metric_test.py and > make this a dependency on generating pmu-events.c. The log output is > displayed if the test fails like (the test was modified to make it > fail): > > ``` > TEST /tmp/perf/pmu-events/metric_test.log > F...... > ====================================================================== > FAIL: test_Brackets (__main__.TestMetricExpressions) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "tools/perf/pmu-events/metric_test.py", line 33, in test_Brackets > self.assertEqual((a * b + c).ToPerfJson(), 'a * b + d') > AssertionError: 'a * b + c' != 'a * b + d' > - a * b + c > ? ^ > + a * b + d Added this: diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore index 05806ecfc33c12a1..f533e76fb48002b7 100644 --- a/tools/perf/.gitignore +++ b/tools/perf/.gitignore @@ -38,6 +38,7 @@ arch/*/include/generated/ trace/beauty/generated/ pmu-events/pmu-events.c pmu-events/jevents +pmu-events/metric_test.log feature/ libapi/ libbpf/ diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index b7d9c42062300d04..bac9272682b759e9 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -1103,6 +1103,7 @@ clean:: $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBSYMBOL)-clean $( $(OUTPUT)util/intel-pt-decoder/inat-tables.c \ $(OUTPUT)tests/llvm-src-{base,kbuild,prologue,relocation}.c \ $(OUTPUT)pmu-events/pmu-events.c \ + $(OUTPUT)pmu-events/metric_test.log \ $(OUTPUT)$(fadvise_advice_array) \ $(OUTPUT)$(fsconfig_arrays) \ $(OUTPUT)$(fsmount_arrays) \