diff options
author | Yabin Cui <yabinc@google.com> | 2021-02-16 19:33:19 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-02-16 19:33:19 +0000 |
commit | 3de67fc5245e2f4e20114d80eb2ceb7124a64cb3 (patch) | |
tree | e84dcfb2524e0c586dc0e988f27b6afe0bde3ff9 /simpleperf/cmd_record_test.cpp | |
parent | dbf33c4847ca20f33f1847184fd98f2b30e920a8 (diff) | |
parent | a89a374a357a915b4ea5083c32a3edd7097e1239 (diff) | |
download | extras-3de67fc5245e2f4e20114d80eb2ceb7124a64cb3.tar.gz |
Merge "simpleperf: add record filter options to record and monitor cmd."
Diffstat (limited to 'simpleperf/cmd_record_test.cpp')
-rw-r--r-- | simpleperf/cmd_record_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/simpleperf/cmd_record_test.cpp b/simpleperf/cmd_record_test.cpp index 666bc91f..67afaf31 100644 --- a/simpleperf/cmd_record_test.cpp +++ b/simpleperf/cmd_record_test.cpp @@ -1095,3 +1095,12 @@ TEST(record_cmd, kprobe_option) { ASSERT_TRUE(RunRecordCmd({"-e", "kprobes:do_sys_open"})); ASSERT_TRUE(RunRecordCmd({"--group", "kprobes:do_sys_open"})); } + +TEST(record_cmd, record_filter_options) { + ASSERT_TRUE( + RunRecordCmd({"--exclude-pid", "1,2", "--exclude-tid", "3,4", "--exclude-process-name", + "processA", "--exclude-thread-name", "threadA", "--exclude-uid", "5,6"})); + ASSERT_TRUE( + RunRecordCmd({"--include-pid", "1,2", "--include-tid", "3,4", "--include-process-name", + "processB", "--include-thread-name", "threadB", "--include-uid", "5,6"})); +} |