aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/thread-map.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2017-02-17 17:17:38 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-02-20 11:35:54 -0300
commitbb963e16507ca7670f0bb47ccaada8874b2ba6a1 (patch)
treef031d2d30e418588ebf323d85f749a14894d6e39 /tools/perf/tests/thread-map.c
parentperf utils: Add perf_quiet_option() (diff)
downloadlinux-dev-bb963e16507ca7670f0bb47ccaada8874b2ba6a1.tar.xz
linux-dev-bb963e16507ca7670f0bb47ccaada8874b2ba6a1.zip
perf utils: Check verbose flag properly
It now can have negative value to suppress the message entirely. So it needs to check it being positive. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170217081742.17417-3-namhyung@kernel.org [ Adjust fuzz on tools/perf/util/pmu.c, add > 0 checks in many other places ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/thread-map.c')
-rw-r--r--tools/perf/tests/thread-map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c
index a4a4b4625ac3..f2d2e542d0ee 100644
--- a/tools/perf/tests/thread-map.c
+++ b/tools/perf/tests/thread-map.c
@@ -109,7 +109,7 @@ int test__thread_map_remove(int subtest __maybe_unused)
TEST_ASSERT_VAL("failed to allocate thread_map",
threads);
- if (verbose)
+ if (verbose > 0)
thread_map__fprintf(threads, stderr);
TEST_ASSERT_VAL("failed to remove thread",
@@ -117,7 +117,7 @@ int test__thread_map_remove(int subtest __maybe_unused)
TEST_ASSERT_VAL("thread_map count != 1", threads->nr == 1);
- if (verbose)
+ if (verbose > 0)
thread_map__fprintf(threads, stderr);
TEST_ASSERT_VAL("failed to remove thread",
@@ -125,7 +125,7 @@ int test__thread_map_remove(int subtest __maybe_unused)
TEST_ASSERT_VAL("thread_map count != 0", threads->nr == 0);
- if (verbose)
+ if (verbose > 0)
thread_map__fprintf(threads, stderr);
TEST_ASSERT_VAL("failed to not remove thread",