From: Shunsuke Nakamura Date: Fri, 20 Aug 2021 09:39:07 +0000 (+0900) Subject: libperf tests: Fix verbose printing X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=37c3193fa4d7ddf93947264fa38d71120ff20c2a;p=linux.git 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 Acked-by: Rob Herring Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210820093908.734503-3-nakamura.shun@fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/lib/perf/include/internal/tests.h b/tools/lib/perf/include/internal/tests.h index 61052099225bf..b130a6663ff8f 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; }