diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-08-12 22:34:06 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-09-25 15:46:53 -0400 |
commit | 54dbfae3007b0c61727abba45af1e4c226908d82 (patch) | |
tree | 123b5f28ad46fb6ff4ea398a2acdc917ccbceafb /tools/perf/tests/builtin-test.c | |
parent | 1ddec7f0d0ab5b71cf2cc5a782441c20e7afbcfb (diff) |
perf tests: Add test for perf_evlist__filter_pollfd()
That will use a synthetic evlist with just what is touched by this new
method to check that it works as expected.
Output in verbose mode:
$ perf test -v pollfd
33: Filter fds with revents mask in a pollfd array :
--- start ---
filtering all but pollfd[2]:
before: 5 [ 5, 4, 3, 2, 1 ]
after: 1 [ 3 ]
filtering all but (pollfd[0], pollfd[3]):
before: 5 [ 5, 4, 3, 2, 1 ]
after: 2 [ 5, 2 ]
test child finished with 0
---- end ----
Filter fds with revents mask in a pollfd array: Ok
$
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-x7c8liszdvc3ocmanf2cet8p@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r-- | tools/perf/tests/builtin-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 6a4145e5ad2c..41e556edbe02 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c | |||
@@ -158,6 +158,10 @@ static struct test { | |||
158 | .func = test__switch_tracking, | 158 | .func = test__switch_tracking, |
159 | }, | 159 | }, |
160 | { | 160 | { |
161 | .desc = "Filter fds with revents mask in a pollfd array", | ||
162 | .func = test__perf_evlist__filter_pollfd, | ||
163 | }, | ||
164 | { | ||
161 | .func = NULL, | 165 | .func = NULL, |
162 | }, | 166 | }, |
163 | }; | 167 | }; |