summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report_test.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-07-11 13:50:01 -0700
committerYabin Cui <yabinc@google.com>2016-07-11 16:10:03 -0700
commit05ef2eab98caee49b6b27cac518856b7f5124bee (patch)
tree8a28af45c4317ae11581452d5285e6b8ef375e6e /simpleperf/cmd_report_test.cpp
parent3c614cb52dede238e161f1937823e039b6fd77ba (diff)
downloadextras-05ef2eab98caee49b6b27cac518856b7f5124bee.tar.gz
simpleperf: change the separator of --symbols option from comma to semicolon.
Function name of c++ can have comma, like func2(int, int). So it is not proper to use comma to separate function names. Bug: 29826956 Change-Id: I9da4bc178232dad53abdc5735358f3feb608fee4 Test: run simpleperf_unit_test.
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r--simpleperf/cmd_report_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp
index 48fe0df7..e6c152e9 100644
--- a/simpleperf/cmd_report_test.cpp
+++ b/simpleperf/cmd_report_test.cpp
@@ -249,16 +249,16 @@ TEST_F(ReportCommandTest, dso_filter_option) {
TEST_F(ReportCommandTest, symbol_filter_option) {
Report(PERF_DATA_WITH_SYMBOLS, {"--sort", "symbol"});
ASSERT_TRUE(success);
- ASSERT_FALSE(AllItemsWithString(lines, {"page_fault"}));
- ASSERT_FALSE(AllItemsWithString(lines, {"page_fault", "perf_event_aux"}));
+ ASSERT_FALSE(AllItemsWithString(lines, {"func2(int, int)"}));
+ ASSERT_FALSE(AllItemsWithString(lines, {"main", "func2(int, int)"}));
Report(PERF_DATA_WITH_SYMBOLS,
- {"--sort", "symbol", "--symbols", "page_fault"});
+ {"--sort", "symbol", "--symbols", "func2(int, int)"});
ASSERT_TRUE(success);
- ASSERT_TRUE(AllItemsWithString(lines, {"page_fault"}));
+ ASSERT_TRUE(AllItemsWithString(lines, {"func2(int, int)"}));
Report(PERF_DATA_WITH_SYMBOLS,
- {"--sort", "symbol", "--symbols", "page_fault,perf_event_aux"});
+ {"--sort", "symbol", "--symbols", "main;func2(int, int)"});
ASSERT_TRUE(success);
- ASSERT_TRUE(AllItemsWithString(lines, {"page_fault", "perf_event_aux"}));
+ ASSERT_TRUE(AllItemsWithString(lines, {"main", "func2(int, int)"}));
}
TEST_F(ReportCommandTest, use_branch_address) {
@@ -308,7 +308,7 @@ TEST_F(ReportCommandTest, report_kernel_symbol) {
TEST_F(ReportCommandTest, report_dumped_symbols) {
Report(PERF_DATA_WITH_SYMBOLS);
ASSERT_TRUE(success);
- ASSERT_NE(content.find("page_fault"), std::string::npos);
+ ASSERT_NE(content.find("main"), std::string::npos);
}
TEST_F(ReportCommandTest, report_sort_vaddr_in_file) {