summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report_test.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-08-30 13:13:17 -0700
committerYabin Cui <yabinc@google.com>2016-08-30 13:13:17 -0700
commiteafa7188ac41584555d36ac0c19f3c7fc66d42cc (patch)
treeb09f064c9750e5c713b078e922c3cafcb0011831 /simpleperf/cmd_report_test.cpp
parent728c8de11dbe51a686b847e6aa056fadb922f61b (diff)
downloadextras-eafa7188ac41584555d36ac0c19f3c7fc66d42cc.tar.gz
simpleperf: fix two errors.
Fix two errors when reporting perf.data generated by linux perf. And add corresponding tests. Test: run simpleperf_unit_test. Change-Id: I04dd88461fdd6a85763847570bac16db1ccb81fa
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r--simpleperf/cmd_report_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp
index a64ee181..a8897758 100644
--- a/simpleperf/cmd_report_test.cpp
+++ b/simpleperf/cmd_report_test.cpp
@@ -411,6 +411,11 @@ TEST_F(ReportCommandTest, read_elf_file_warning) {
testing::ExitedWithCode(0), "elf: Read failed");
}
+TEST_F(ReportCommandTest, report_data_generated_by_linux_perf) {
+ Report(PERF_DATA_GENERATED_BY_LINUX_PERF);
+ ASSERT_TRUE(success);
+}
+
#if defined(__linux__)
static std::unique_ptr<Command> RecordCmd() {