OLD | NEW |
1 // Copyright (c) 2014, Google Inc. | 1 // Copyright (c) 2014, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 ProcessState state; | 216 ProcessState state; |
217 AnalyzeDump("microdump-multiple.dmp", false /* omit_symbols */, | 217 AnalyzeDump("microdump-multiple.dmp", false /* omit_symbols */, |
218 6 /* expected_cpu_count */, &state); | 218 6 /* expected_cpu_count */, &state); |
219 ASSERT_EQ(133U, state.modules()->module_count()); | 219 ASSERT_EQ(133U, state.modules()->module_count()); |
220 ASSERT_EQ("arm", state.system_info()->cpu); | 220 ASSERT_EQ("arm", state.system_info()->cpu); |
221 ASSERT_EQ("lge/p1_tmo_us/p1:6.0/MRA58K/1603210524c8d:user/release-keys", | 221 ASSERT_EQ("lge/p1_tmo_us/p1:6.0/MRA58K/1603210524c8d:user/release-keys", |
222 state.system_info()->os_version); | 222 state.system_info()->os_version); |
223 ASSERT_EQ(2U, state.threads()->at(0)->frames()->size()); | 223 ASSERT_EQ(2U, state.threads()->at(0)->frames()->size()); |
224 } | 224 } |
225 | 225 |
| 226 TEST_F(MicrodumpProcessorTest, TestProcessMips) { |
| 227 ProcessState state; |
| 228 AnalyzeDump("microdump-mips32.dmp", false /* omit_symbols */, |
| 229 2 /* expected_cpu_count */, &state); |
| 230 |
| 231 ASSERT_EQ(7U, state.modules()->module_count()); |
| 232 ASSERT_EQ("mips", state.system_info()->cpu); |
| 233 ASSERT_EQ("3.0.8-g893bf16 #7 SMP PREEMPT Fri Jul 10 15:20:59 PDT 2015", |
| 234 state.system_info()->os_version); |
| 235 ASSERT_EQ(4U, state.threads()->at(0)->frames()->size()); |
| 236 |
| 237 ASSERT_EQ("blaTest", |
| 238 state.threads()->at(0)->frames()->at(0)->function_name); |
| 239 ASSERT_EQ("Crash", |
| 240 state.threads()->at(0)->frames()->at(1)->function_name); |
| 241 ASSERT_EQ("main", |
| 242 state.threads()->at(0)->frames()->at(2)->function_name); |
| 243 ASSERT_EQ("crash_example", |
| 244 state.threads()->at(0)->frames()->at(0)->module->debug_file()); |
| 245 } |
| 246 |
| 247 TEST_F(MicrodumpProcessorTest, TestProcessMips64) { |
| 248 ProcessState state; |
| 249 AnalyzeDump("microdump-mips64.dmp", false /* omit_symbols */, |
| 250 1 /* expected_cpu_count */, &state); |
| 251 |
| 252 ASSERT_EQ(7U, state.modules()->module_count()); |
| 253 ASSERT_EQ("mips64", state.system_info()->cpu); |
| 254 ASSERT_EQ("3.10.0-gf185e20 #112 PREEMPT Mon Oct 5 11:12:49 PDT 2015", |
| 255 state.system_info()->os_version); |
| 256 ASSERT_EQ(4U, state.threads()->at(0)->frames()->size()); |
| 257 |
| 258 ASSERT_EQ("blaTest", |
| 259 state.threads()->at(0)->frames()->at(0)->function_name); |
| 260 ASSERT_EQ("Crash", |
| 261 state.threads()->at(0)->frames()->at(1)->function_name); |
| 262 ASSERT_EQ("main", |
| 263 state.threads()->at(0)->frames()->at(2)->function_name); |
| 264 ASSERT_EQ("crash_example", |
| 265 state.threads()->at(0)->frames()->at(0)->module->debug_file()); |
| 266 } |
| 267 |
226 } // namespace | 268 } // namespace |
227 | 269 |
228 int main(int argc, char* argv[]) { | 270 int main(int argc, char* argv[]) { |
229 ::testing::InitGoogleTest(&argc, argv); | 271 ::testing::InitGoogleTest(&argc, argv); |
230 return RUN_ALL_TESTS(); | 272 return RUN_ALL_TESTS(); |
231 } | 273 } |
OLD | NEW |