summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_record_test.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2021-02-16 19:33:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-02-16 19:33:19 +0000
commit3de67fc5245e2f4e20114d80eb2ceb7124a64cb3 (patch)
treee84dcfb2524e0c586dc0e988f27b6afe0bde3ff9 /simpleperf/cmd_record_test.cpp
parentdbf33c4847ca20f33f1847184fd98f2b30e920a8 (diff)
parenta89a374a357a915b4ea5083c32a3edd7097e1239 (diff)
downloadextras-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.cpp9
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"}));
+}