diff options
author | Yabin Cui <yabinc@google.com> | 2018-04-18 19:32:06 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2018-04-18 19:32:06 -0700 |
commit | 92c4cb1e80909889293f487ca95225cb2ae89384 (patch) | |
tree | a4fd987999816b82e2cf726f0066acfd0da315d7 /simpleperf/cmd_dumprecord_test.cpp | |
parent | ad82aa57ad69b7a110ebbc6a4ced08f930e52d96 (diff) | |
download | extras-92c4cb1e80909889293f487ca95225cb2ae89384.tar.gz |
simpleperf: fix some errors testing on windows.
Bug: none.
Test: run simpleperf_unit_test.
Test: run test.py.
Change-Id: I9c77ce1704d7d7038c450a5f85c569dc2a728b92
Diffstat (limited to 'simpleperf/cmd_dumprecord_test.cpp')
-rw-r--r-- | simpleperf/cmd_dumprecord_test.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/simpleperf/cmd_dumprecord_test.cpp b/simpleperf/cmd_dumprecord_test.cpp index ae959210..a2a50cee 100644 --- a/simpleperf/cmd_dumprecord_test.cpp +++ b/simpleperf/cmd_dumprecord_test.cpp @@ -18,6 +18,7 @@ #include "command.h" #include "get_test_data.h" +#include "test_util.h" static std::unique_ptr<Command> DumpCmd() { return CreateCommandInstance("dump"); @@ -34,3 +35,12 @@ TEST(cmd_dump, dump_data_generated_by_linux_perf) { TEST(cmd_dump, dump_callchain_records) { ASSERT_TRUE(DumpCmd()->Run({GetTestData(PERF_DATA_WITH_CALLCHAIN_RECORD)})); } + +TEST(cmd_dump, dump_callchain_of_sample_records) { + CaptureStdout capture; + ASSERT_TRUE(capture.Start()); + ASSERT_TRUE(DumpCmd()->Run({GetTestData(PERF_DATA_WITH_INTERPRETER_FRAMES)})); + std::string data = capture.Finish(); + ASSERT_NE(data.find("[kernel.kallsyms][+ffffffc000086b4a]"), std::string::npos); + ASSERT_NE(data.find("__ioctl (/system/lib64/libc.so[+70b6c])"), std::string::npos); +} |