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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1105C19F2D for ; Tue, 9 Aug 2022 15:39:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239931AbiHIPjG (ORCPT ); Tue, 9 Aug 2022 11:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238009AbiHIPjG (ORCPT ); Tue, 9 Aug 2022 11:39:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED863C5A; Tue, 9 Aug 2022 08:39:04 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 89839612A3; Tue, 9 Aug 2022 15:39:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDE14C433D6; Tue, 9 Aug 2022 15:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660059543; bh=pfGxlai/gQ8q5M4UhIltp0q/iYXJpDj1pBiy5hYxVEI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ER6+rN1Pklc1K+BbltD08L/2w0TnI3lSCVNvggVd1JuA6SH+WuIb4rGyGG7vys1tg om+SA/UfbbflGFdZCEbvc0VitYP4YJdxpcoDHjEQflKFkHh+bbgRkbBA5D8AEg4iVg xjHWU+ki+mdhes7crbBwc1llDXtqw/9Ae5rZ7HHCnIsDWNm3Kiq3Ej0aibDfqVYO+E KlssYhOfOS55D6NLmZB2rP1hJ/yyApZeeTcoEY7mR0nLvNi5zZ5ILTb3UDp9kkTwLj 37XSrz6VplAh+tzb1aySAhKubLavRAJHjJZM9QwA5A9SabgfGNg3c1fNdA6RTE/+rg cbiemdAvnle+w== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 49B274035A; Tue, 9 Aug 2022 12:39:01 -0300 (-03) Date: Tue, 9 Aug 2022 12:39:01 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Kan Liang , Zhengjun Xing , Sandipan Das , Claire Jensen , Alyssa Ross , Like Xu , James Clark , Florian Fischer , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Claire Jensen , Stephane Eranian Subject: Re: [PATCH v7 2/2] perf test: Json format checking Message-ID: References: <20220805200105.2020995-1-irogers@google.com> <20220805200105.2020995-3-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220805200105.2020995-3-irogers@google.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Fri, Aug 05, 2022 at 01:01:05PM -0700, Ian Rogers escreveu: > From: Claire Jensen > > Add field checking tests for perf stat JSON output. > Sanity checks the expected number of fields are present, that the > expected keys are present and they have the correct values. > > Signed-off-by: Claire Jensen > Signed-off-by: Ian Rogers > --- > tools/perf/Makefile.perf | 3 +- > .../tests/shell/lib/perf_json_output_lint.py | 96 ++++++++++++ > tools/perf/tests/shell/stat+json_output.sh | 147 ++++++++++++++++++ > 3 files changed, 245 insertions(+), 1 deletion(-) > create mode 100644 tools/perf/tests/shell/lib/perf_json_output_lint.py > create mode 100755 tools/perf/tests/shell/stat+json_output.sh > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > index 5053b563bf9c..b4c5160d3e85 100644 > --- a/tools/perf/Makefile.perf > +++ b/tools/perf/Makefile.perf > @@ -1005,7 +1005,8 @@ install-tests: all install-gtk > $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ > $(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ > $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \ > - $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' > + $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' \ > + $(INSTALL) tests/shell/lib/*.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' Next time please test installing it, since this is adding a new file: INSTALL tests install: omitting directory '/home/acme/libexec/perf-core/tests/shell/lib' install: cannot stat 'install': No such file or directory make[2]: *** [Makefile.perf:999: install-tests] Error 1 make[2]: *** Waiting for unfinished jobs.... Fixed with: diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index b4c5160d3e85a161..e5921b3471535d45 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -1005,7 +1005,7 @@ install-tests: all install-gtk $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ $(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \ - $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' \ + $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \ $(INSTALL) tests/shell/lib/*.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' install-bin: install-tools install-tests install-traceevent-plugins