diff options
author | Shunsuke Nakamura <nakamura.shun@fujitsu.com> | 2021-08-20 18:39:07 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-08-24 15:05:35 -0300 |
commit | 37c3193fa4d7ddf93947264fa38d71120ff20c2a (patch) | |
tree | 121acb04c9c0c97fce5f2569b6ce00b2105ae4e0 /tools/lib/perf | |
parent | ce73af80876dba7b855fe36d1ec473f77300c214 (diff) | |
download | linux-37c3193fa4d7ddf93947264fa38d71120ff20c2a.tar.gz linux-37c3193fa4d7ddf93947264fa38d71120ff20c2a.tar.bz2 linux-37c3193fa4d7ddf93947264fa38d71120ff20c2a.zip |
libperf tests: Fix verbose printing
libperf's verbose printing checks the -v option every time the macro _T_ START
is called.
Since there are currently four libperf tests registered, the macro _T_ START is
called four times, but verbose printing after the second time is not output.
Resets the index of the element processed by getopt() and fix verbose printing
so that it prints in all tests.
Signed-off-by: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
Acked-by: Rob Herring <robh@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210820093908.734503-3-nakamura.shun@fujitsu.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/perf')
-rw-r--r-- | tools/lib/perf/include/internal/tests.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/perf/include/internal/tests.h b/tools/lib/perf/include/internal/tests.h index 61052099225b..b130a6663ff8 100644 --- a/tools/lib/perf/include/internal/tests.h +++ b/tools/lib/perf/include/internal/tests.h @@ -23,6 +23,8 @@ static inline int get_verbose(char **argv, int argc) break; } } + optind = 1; + return verbose; } |