summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report_sample_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'simpleperf/cmd_report_sample_test.cpp')
-rw-r--r--simpleperf/cmd_report_sample_test.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_sample_test.cpp b/simpleperf/cmd_report_sample_test.cpp
index 3e92396d..2a712be4 100644
--- a/simpleperf/cmd_report_sample_test.cpp
+++ b/simpleperf/cmd_report_sample_test.cpp
@@ -79,3 +79,15 @@ TEST(cmd_report_sample, sample_has_event_count) {
ASSERT_TRUE(android::base::ReadFileToString(tmpfile2.path, &data));
ASSERT_NE(data.find("event_count:"), std::string::npos);
}
+
+TEST(cmd_report_sample, has_thread_record) {
+ TemporaryFile tmpfile;
+ TemporaryFile tmpfile2;
+ ASSERT_TRUE(ReportSampleCmd()->Run({"-i", GetTestData(PERF_DATA_WITH_SYMBOLS),
+ "-o", tmpfile.path, "--protobuf"}));
+ ASSERT_TRUE(ReportSampleCmd()->Run(
+ {"--dump-protobuf-report", tmpfile.path, "-o", tmpfile2.path}));
+ std::string data;
+ ASSERT_TRUE(android::base::ReadFileToString(tmpfile2.path, &data));
+ ASSERT_NE(data.find("thread:"), std::string::npos);
+}