OLD | NEW |
---|---|
1 // Copyright 2013 Google Inc. All Rights Reserved. | 1 // Copyright 2013 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 ModuleInformationSet; | 340 ModuleInformationSet; |
341 | 341 |
342 using grinder::grinders::ProfileGrinder::PartData; | 342 using grinder::grinders::ProfileGrinder::PartData; |
343 using grinder::grinders::ProfileGrinder::PartDataMap; | 343 using grinder::grinders::ProfileGrinder::PartDataMap; |
344 using grinder::grinders::ProfileGrinder::PartKey; | 344 using grinder::grinders::ProfileGrinder::PartKey; |
345 | 345 |
346 using grinder::grinders::ProfileGrinder::modules_; | 346 using grinder::grinders::ProfileGrinder::modules_; |
347 using grinder::grinders::ProfileGrinder::parts_; | 347 using grinder::grinders::ProfileGrinder::parts_; |
348 }; | 348 }; |
349 | 349 |
350 enum InstrumentationMode { | |
351 SYZYGY, | |
352 CLANG, | |
353 }; | |
354 | |
350 class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest { | 355 class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest { |
351 public: | 356 public: |
352 typedef testing::PELibUnitTest Super; | 357 typedef testing::PELibUnitTest Super; |
353 | 358 |
354 // A callback that gets hooked up to catch exceptions in the RTL. | 359 // A callback that gets hooked up to catch exceptions in the RTL. |
355 MOCK_METHOD1(OnExceptionCallback, void(EXCEPTION_POINTERS*)); | 360 MOCK_METHOD1(OnExceptionCallback, void(EXCEPTION_POINTERS*)); |
356 | 361 |
357 LenientInstrumentAppIntegrationTest() | 362 LenientInstrumentAppIntegrationTest() |
358 : cmd_line_(base::FilePath(L"instrument.exe")), | 363 : cmd_line_(base::FilePath(L"instrument.exe")), |
359 test_impl_(test_app_.implementation()), | 364 test_impl_(test_app_.implementation()), |
(...skipping 12 matching lines...) Expand all Loading... | |
372 this->CreateTemporaryDir(&temp_dir_); | 377 this->CreateTemporaryDir(&temp_dir_); |
373 stdin_path_ = temp_dir_.Append(L"NUL"); | 378 stdin_path_ = temp_dir_.Append(L"NUL"); |
374 stdout_path_ = temp_dir_.Append(L"stdout.txt"); | 379 stdout_path_ = temp_dir_.Append(L"stdout.txt"); |
375 stderr_path_ = temp_dir_.Append(L"stderr.txt"); | 380 stderr_path_ = temp_dir_.Append(L"stderr.txt"); |
376 InitStreams(stdin_path_, stdout_path_, stderr_path_); | 381 InitStreams(stdin_path_, stdout_path_, stderr_path_); |
377 | 382 |
378 // Initialize the (potential) input and output path values. | 383 // Initialize the (potential) input and output path values. |
379 base::FilePath abs_input_dll_path_ = | 384 base::FilePath abs_input_dll_path_ = |
380 testing::GetExeRelativePath(testing::kIntegrationTestsDllName); | 385 testing::GetExeRelativePath(testing::kIntegrationTestsDllName); |
381 input_dll_path_ = testing::GetRelativePath(abs_input_dll_path_); | 386 input_dll_path_ = testing::GetRelativePath(abs_input_dll_path_); |
382 output_dll_path_ = temp_dir_.Append(input_dll_path_.BaseName()); | 387 test_dll_path_ = temp_dir_.Append(input_dll_path_.BaseName()); |
383 | 388 |
384 // Initialize call_service output directory for produced trace files. | 389 // Initialize call_service output directory for produced trace files. |
385 traces_dir_ = temp_dir_.Append(L"traces"); | 390 traces_dir_ = temp_dir_.Append(L"traces"); |
386 | 391 |
387 // Initialize call_service session id. | 392 // Initialize call_service session id. |
388 service_.SetEnvironment(); | 393 service_.SetEnvironment(); |
389 | 394 |
390 ASSERT_NO_FATAL_FAILURE(ConfigureTestApp(&test_app_)); | 395 ASSERT_NO_FATAL_FAILURE(ConfigureTestApp(&test_app_)); |
391 } | 396 } |
392 | 397 |
(...skipping 20 matching lines...) Expand all Loading... | |
413 void StopService() { | 418 void StopService() { |
414 service_.Stop(); | 419 service_.Stop(); |
415 } | 420 } |
416 | 421 |
417 void UnloadDll() { | 422 void UnloadDll() { |
418 module_.Reset(NULL); | 423 module_.Reset(NULL); |
419 } | 424 } |
420 | 425 |
421 // Runs an instrumentation pass in the given mode and validates that the | 426 // Runs an instrumentation pass in the given mode and validates that the |
422 // resulting output DLL loads. | 427 // resulting output DLL loads. |
423 void EndToEndTest(const std::string& mode) { | 428 virtual void EndToEndTest(const std::string& mode) { |
424 cmd_line_.AppendSwitchPath("input-image", input_dll_path_); | 429 cmd_line_.AppendSwitchPath("input-image", input_dll_path_); |
425 cmd_line_.AppendSwitchPath("output-image", output_dll_path_); | 430 cmd_line_.AppendSwitchPath("output-image", test_dll_path_); |
426 cmd_line_.AppendSwitchASCII("mode", mode); | 431 cmd_line_.AppendSwitchASCII("mode", mode); |
427 | 432 |
428 // Create the instrumented DLL. | 433 // Create the instrumented DLL. |
429 application::Application<instrument::InstrumentApp> app; | 434 application::Application<instrument::InstrumentApp> app; |
430 ASSERT_NO_FATAL_FAILURE(ConfigureTestApp(&app)); | 435 ASSERT_NO_FATAL_FAILURE(ConfigureTestApp(&app)); |
431 ASSERT_EQ(0, app.Run()); | 436 ASSERT_EQ(0, app.Run()); |
432 | 437 |
433 // Validate that the test dll loads post instrumentation. | 438 // Validate that the test dll loads post instrumentation. |
434 ASSERT_NO_FATAL_FAILURE(LoadTestDll(output_dll_path_, &module_)); | 439 ASSERT_NO_FATAL_FAILURE(LoadTestDll(test_dll_path_, &module_)); |
435 } | 440 } |
436 | 441 |
437 // Invoke a test function inside test_dll by addressing it with a test id. | 442 // Invoke a test function inside test_dll by addressing it with a test id. |
438 // Returns the value resulting from the test function execution. | 443 // Returns the value resulting from the test function execution. |
439 unsigned int InvokeTestDllFunction(testing::EndToEndTestId test) { | 444 unsigned int InvokeTestDllFunction(testing::EndToEndTestId test) { |
440 // Load the exported 'function_name' function. | 445 // Load the exported 'function_name' function. |
441 typedef unsigned int (CALLBACK* TestDllFuncs)(unsigned int); | 446 typedef unsigned int (CALLBACK* TestDllFuncs)(unsigned int); |
442 TestDllFuncs func = reinterpret_cast<TestDllFuncs>( | 447 TestDllFuncs func = reinterpret_cast<TestDllFuncs>( |
443 ::GetProcAddress(module_, "EndToEndTest")); | 448 ::GetProcAddress(module_, "EndToEndTest")); |
444 DCHECK(func != NULL); | 449 DCHECK(func != NULL); |
445 | 450 |
446 // Invoke it, and returns its value. | 451 // Invoke it, and returns its value. |
447 return func(test); | 452 return func(test); |
448 } | 453 } |
449 | 454 |
450 int RunOutOfProcessFunction(const base::string16& harness_name, | 455 int RunOutOfProcessFunction(const base::string16& harness_name, |
451 testing::EndToEndTestId test, | 456 testing::EndToEndTestId test, |
452 bool expect_exception) { | 457 bool expect_exception) { |
453 base::FilePath harness = testing::GetExeRelativePath(harness_name.c_str()); | 458 base::FilePath harness = testing::GetExeRelativePath(harness_name.c_str()); |
454 base::CommandLine cmd_line(harness); | 459 base::CommandLine cmd_line(harness); |
455 cmd_line.AppendSwitchASCII("test", base::StringPrintf("%d", test)); | 460 cmd_line.AppendSwitchASCII("test", base::StringPrintf("%d", test)); |
456 cmd_line.AppendSwitchPath("dll", output_dll_path_); | 461 cmd_line.AppendSwitchPath("dll", test_dll_path_); |
457 if (expect_exception) | 462 if (expect_exception) |
458 cmd_line.AppendSwitch("expect-exception"); | 463 cmd_line.AppendSwitch("expect-exception"); |
459 | 464 |
460 base::LaunchOptions options; | 465 base::LaunchOptions options; |
461 base::Process process = base::LaunchProcess(cmd_line, options); | 466 base::Process process = base::LaunchProcess(cmd_line, options); |
462 EXPECT_TRUE(process.IsValid()); | 467 EXPECT_TRUE(process.IsValid()); |
463 | 468 |
464 int exit_code = 0; | 469 int exit_code = 0; |
465 EXPECT_TRUE(process.WaitForExit(&exit_code)); | 470 EXPECT_TRUE(process.WaitForExit(&exit_code)); |
466 return exit_code; | 471 return exit_code; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
568 // Memory acessors in the dynamic RTL must be redirected after first | 573 // Memory acessors in the dynamic RTL must be redirected after first |
569 // use of the function. If the dynamic RTL doesn't redirect the imports | 574 // use of the function. If the dynamic RTL doesn't redirect the imports |
570 // everything will still work, just terribly slowly. | 575 // everything will still work, just terribly slowly. |
571 ASSERT_NE(rtl_export_fn, imported_fn); | 576 ASSERT_NE(rtl_export_fn, imported_fn); |
572 } else { | 577 } else { |
573 ASSERT_EQ(rtl_export_fn, imported_fn); | 578 ASSERT_EQ(rtl_export_fn, imported_fn); |
574 } | 579 } |
575 } | 580 } |
576 } | 581 } |
577 | 582 |
578 void EndToEndCheckTestDll() { | 583 virtual void EndToEndCheckTestDll() { |
579 // Validate that behavior is unchanged after instrumentation. | 584 // Validate that behavior is unchanged after instrumentation. |
580 EXPECT_EQ(0xfff80200, InvokeTestDllFunction(testing::kArrayComputation1)); | 585 EXPECT_EQ(0xfff80200, InvokeTestDllFunction(testing::kArrayComputation1)); |
581 EXPECT_EQ(0x00000200, InvokeTestDllFunction(testing::kArrayComputation2)); | 586 EXPECT_EQ(0x00000200, InvokeTestDllFunction(testing::kArrayComputation2)); |
582 } | 587 } |
583 | 588 |
584 bool AsanErrorCheck(testing::EndToEndTestId test, | 589 bool AsanErrorCheck(testing::EndToEndTestId test, |
585 BadAccessKind kind, | 590 BadAccessKind kind, |
586 AccessMode mode, | 591 AccessMode mode, |
587 size_t size, | 592 size_t size, |
588 size_t max_tries, | 593 size_t max_tries, |
(...skipping 21 matching lines...) Expand all Loading... | |
610 InvokeTestDllFunction(test); | 615 InvokeTestDllFunction(test); |
611 if (unload) | 616 if (unload) |
612 UnloadDll(); | 617 UnloadDll(); |
613 | 618 |
614 // If this appears to have failed then retry it for all but the last | 619 // If this appears to have failed then retry it for all but the last |
615 // attempt. Some tests have a non-zero chance of failure, but their | 620 // attempt. Some tests have a non-zero chance of failure, but their |
616 // chances of failing repeatedly are infinitesimally small. | 621 // chances of failing repeatedly are infinitesimally small. |
617 if (asan_error_count == 0 && i + 1 < max_tries) { | 622 if (asan_error_count == 0 && i + 1 < max_tries) { |
618 // If the module was unloaded and the test is retrying, then reload it. | 623 // If the module was unloaded and the test is retrying, then reload it. |
619 if (unload) | 624 if (unload) |
620 EXPECT_NO_FATAL_FAILURE(LoadTestDll(output_dll_path_, &module_)); | 625 EXPECT_NO_FATAL_FAILURE(LoadTestDll(test_dll_path_, &module_)); |
621 continue; | 626 continue; |
622 } | 627 } |
623 | 628 |
624 if (asan_error_count == 0 || | 629 if (asan_error_count == 0 || |
625 last_asan_error.error_type != kind || | 630 last_asan_error.error_type != kind || |
626 last_asan_error.access_mode != mode || | 631 last_asan_error.access_mode != mode || |
627 last_asan_error.access_size != size) { | 632 last_asan_error.access_size != size) { |
628 return false; | 633 return false; |
629 } | 634 } |
630 break; | 635 break; |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1262 base::FilePath temp_dir_; | 1267 base::FilePath temp_dir_; |
1263 base::FilePath stdin_path_; | 1268 base::FilePath stdin_path_; |
1264 base::FilePath stdout_path_; | 1269 base::FilePath stdout_path_; |
1265 base::FilePath stderr_path_; | 1270 base::FilePath stderr_path_; |
1266 // @} | 1271 // @} |
1267 | 1272 |
1268 // @name Command-line, parameters and outputs. | 1273 // @name Command-line, parameters and outputs. |
1269 // @{ | 1274 // @{ |
1270 base::CommandLine cmd_line_; | 1275 base::CommandLine cmd_line_; |
1271 base::FilePath input_dll_path_; | 1276 base::FilePath input_dll_path_; |
1272 base::FilePath output_dll_path_; | 1277 base::FilePath test_dll_path_; |
1273 base::FilePath traces_dir_; | 1278 base::FilePath traces_dir_; |
1274 // @} | 1279 // @} |
1275 | 1280 |
1276 // The test_dll module. | 1281 // The test_dll module. |
1277 testing::ScopedHMODULE module_; | 1282 testing::ScopedHMODULE module_; |
1278 | 1283 |
1279 // Our call trace service process instance. | 1284 // Our call trace service process instance. |
1280 testing::CallTraceService service_; | 1285 testing::CallTraceService service_; |
1281 | 1286 |
1282 // Decomposed image. | 1287 // Decomposed image. |
1283 pe::PEFile pe_image_; | 1288 pe::PEFile pe_image_; |
1284 pe::ImageLayout image_layout_; | 1289 pe::ImageLayout image_layout_; |
1285 block_graph::BlockGraph block_graph_; | 1290 block_graph::BlockGraph block_graph_; |
1286 uint32_t get_my_rva_; | 1291 uint32_t get_my_rva_; |
1287 }; | 1292 }; |
1293 | |
1294 // Class created to enable parametrization of the tests with clang. | |
Sébastien Marchand
2017/08/07 18:21:50
Clang.
| |
1295 // Currently only Syzygy is supported but will be extended to work with CLANG. | |
1296 // Rigth now it just forwards the calls to the parent class. | |
Sébastien Marchand
2017/08/07 18:21:50
right.
| |
1297 class ParametrizedLenientInstrumentAppIntegrationTest | |
1298 : public LenientInstrumentAppIntegrationTest, | |
1299 public ::testing::WithParamInterface<InstrumentationMode> { | |
1300 public: | |
1301 void EndToEndTest(const std::string& mode) override { | |
1302 if (GetParam() == SYZYGY) { | |
1303 LenientInstrumentAppIntegrationTest::EndToEndTest(mode); | |
1304 } | |
1305 } | |
1306 | |
1307 void EndToEndCheckTestDll() override { | |
1308 if (GetParam() == SYZYGY) { | |
1309 LenientInstrumentAppIntegrationTest::EndToEndCheckTestDll(); | |
1310 } | |
1311 } | |
1312 }; | |
1313 | |
1314 typedef testing::StrictMock<ParametrizedLenientInstrumentAppIntegrationTest> | |
1315 ParametrizedInstrumentAppIntegrationTest; | |
1316 | |
1288 typedef testing::StrictMock<LenientInstrumentAppIntegrationTest> | 1317 typedef testing::StrictMock<LenientInstrumentAppIntegrationTest> |
1289 InstrumentAppIntegrationTest; | 1318 InstrumentAppIntegrationTest; |
1290 | 1319 |
1291 typedef std::map<std::string, size_t> FunctionOffsetMap; | 1320 typedef std::map<std::string, size_t> FunctionOffsetMap; |
1292 | 1321 |
1293 // A utility transform for extracting call site offsets from blocks. | 1322 // A utility transform for extracting call site offsets from blocks. |
1294 // Used by GetCallOffsets and ZebraBlockHeap tests. | 1323 // Used by GetCallOffsets and ZebraBlockHeap tests. |
1295 class ExtractCallTransform | 1324 class ExtractCallTransform |
1296 : public block_graph::BasicBlockSubGraphTransformInterface { | 1325 : public block_graph::BasicBlockSubGraphTransformInterface { |
1297 public: | 1326 public: |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1400 OutOfProcessAsanErrorCheckAndValidateLog( | 1429 OutOfProcessAsanErrorCheckAndValidateLog( |
1401 testing::kAsanReadPageAllocationTrailerBeforeFreeAllocation, enabled, | 1430 testing::kAsanReadPageAllocationTrailerBeforeFreeAllocation, enabled, |
1402 kAsanAccessViolationLog, kAsanHeapBufferOverflow); | 1431 kAsanAccessViolationLog, kAsanHeapBufferOverflow); |
1403 OutOfProcessAsanErrorCheckAndValidateLog( | 1432 OutOfProcessAsanErrorCheckAndValidateLog( |
1404 testing::kAsanWritePageAllocationBodyAfterFree, enabled, | 1433 testing::kAsanWritePageAllocationBodyAfterFree, enabled, |
1405 kAsanAccessViolationLog, kAsanHeapUseAfterFree); | 1434 kAsanAccessViolationLog, kAsanHeapUseAfterFree); |
1406 } | 1435 } |
1407 | 1436 |
1408 } // namespace | 1437 } // namespace |
1409 | 1438 |
1410 TEST_F(InstrumentAppIntegrationTest, AsanEndToEnd) { | 1439 TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanEndToEnd) { |
1411 // Disable the heap checking as this is implies touching all the shadow bytes | 1440 // Disable the heap checking as this is implies touching all the shadow bytes |
1412 // and this make those tests really slow. | 1441 // and this make those tests really slow. |
1413 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); | 1442 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); |
1414 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1443 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1415 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1444 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1416 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); | 1445 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); |
1417 ASSERT_NO_FATAL_FAILURE(CheckTestDllImportsRedirected()); | 1446 ASSERT_NO_FATAL_FAILURE(CheckTestDllImportsRedirected()); |
1418 } | 1447 } |
1419 | 1448 |
1420 TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoLiveness) { | 1449 TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanEndToEndNoLiveness) { |
1421 // Disable the heap checking as this is implies touching all the shadow bytes | 1450 // Disable the heap checking as this is implies touching all the shadow bytes |
1422 // and this make those tests really slow. | 1451 // and this make those tests really slow. |
1423 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); | 1452 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); |
1424 cmd_line_.AppendSwitch("no-liveness-analysis"); | 1453 cmd_line_.AppendSwitch("no-liveness-analysis"); |
1425 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1454 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1426 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1455 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1427 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); | 1456 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); |
1428 } | 1457 } |
1429 | 1458 |
1430 TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoRedundancyAnalysis) { | 1459 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1460 AsanEndToEndNoRedundancyAnalysis) { | |
1431 // Disable the heap checking as this is implies touching all the shadow bytes | 1461 // Disable the heap checking as this is implies touching all the shadow bytes |
1432 // and this make those tests really slow. | 1462 // and this make those tests really slow. |
1433 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); | 1463 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); |
1434 cmd_line_.AppendSwitch("no-redundancy-analysis"); | 1464 cmd_line_.AppendSwitch("no-redundancy-analysis"); |
1435 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1465 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1436 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1466 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1437 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); | 1467 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); |
1438 } | 1468 } |
1439 | 1469 |
1440 TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoFunctionInterceptors) { | 1470 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1471 AsanEndToEndNoFunctionInterceptors) { | |
1441 // Disable the heap checking as this is implies touching all the shadow bytes | 1472 // Disable the heap checking as this is implies touching all the shadow bytes |
1442 // and this make those tests really slow. | 1473 // and this make those tests really slow. |
1443 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); | 1474 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); |
1444 cmd_line_.AppendSwitch("no-interceptors"); | 1475 cmd_line_.AppendSwitch("no-interceptors"); |
1445 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1476 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1446 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1477 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1447 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); | 1478 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); |
1448 } | 1479 } |
1449 | 1480 |
1450 TEST_F(InstrumentAppIntegrationTest, AsanEndToEndWithRtlOptions) { | 1481 TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanEndToEndWithRtlOptions) { |
1451 cmd_line_.AppendSwitchASCII( | 1482 cmd_line_.AppendSwitchASCII( |
1452 "asan-rtl-options", | 1483 "asan-rtl-options", |
1453 "--quarantine_size=20000000 --quarantine_block_size=1000000 " | 1484 "--quarantine_size=20000000 --quarantine_block_size=1000000 " |
1454 "--no_check_heap_on_failure"); | 1485 "--no_check_heap_on_failure"); |
1455 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1486 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1456 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1487 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1457 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); | 1488 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); |
1458 | 1489 |
1459 // Get the active runtime and validate its parameters. | 1490 // Get the active runtime and validate its parameters. |
1460 agent::asan::AsanRuntime* runtime = GetActiveAsanRuntime(); | 1491 agent::asan::AsanRuntime* runtime = GetActiveAsanRuntime(); |
1461 ASSERT_TRUE(runtime != NULL); | 1492 ASSERT_TRUE(runtime != NULL); |
1462 ASSERT_EQ(20000000u, runtime->params().quarantine_size); | 1493 ASSERT_EQ(20000000u, runtime->params().quarantine_size); |
1463 ASSERT_EQ(1000000u, runtime->params().quarantine_block_size); | 1494 ASSERT_EQ(1000000u, runtime->params().quarantine_block_size); |
1464 } | 1495 } |
1465 | 1496 |
1466 TEST_F(InstrumentAppIntegrationTest, | 1497 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1467 AsanEndToEndWithRtlOptionsOverrideWithEnvironment) { | 1498 AsanEndToEndWithRtlOptionsOverrideWithEnvironment) { |
1468 std::unique_ptr<base::Environment> env(base::Environment::Create()); | 1499 std::unique_ptr<base::Environment> env(base::Environment::Create()); |
1469 ASSERT_NE(env.get(), nullptr); | 1500 ASSERT_NE(env.get(), nullptr); |
1470 env->SetVar(::common::kSyzyAsanOptionsEnvVar, | 1501 env->SetVar(::common::kSyzyAsanOptionsEnvVar, |
1471 "--quarantine_block_size=800000 --ignored_stack_ids=0x1 " | 1502 "--quarantine_block_size=800000 --ignored_stack_ids=0x1 " |
1472 "--no_check_heap_on_failure"); | 1503 "--no_check_heap_on_failure"); |
1473 cmd_line_.AppendSwitchASCII( | 1504 cmd_line_.AppendSwitchASCII( |
1474 "asan-rtl-options", | 1505 "asan-rtl-options", |
1475 "--quarantine_size=20000000 --quarantine_block_size=1000000 " | 1506 "--quarantine_size=20000000 --quarantine_block_size=1000000 " |
1476 "--ignored_stack_ids=0x2"); | 1507 "--ignored_stack_ids=0x2"); |
1477 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1508 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1478 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1509 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1479 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); | 1510 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); |
1480 | 1511 |
1481 // Get the active runtime and validate its parameters. | 1512 // Get the active runtime and validate its parameters. |
1482 agent::asan::AsanRuntime* runtime = GetActiveAsanRuntime(); | 1513 agent::asan::AsanRuntime* runtime = GetActiveAsanRuntime(); |
1483 ASSERT_TRUE(runtime != NULL); | 1514 ASSERT_TRUE(runtime != NULL); |
1484 ASSERT_EQ(20000000u, runtime->params().quarantine_size); | 1515 ASSERT_EQ(20000000u, runtime->params().quarantine_size); |
1485 ASSERT_EQ(800000u, runtime->params().quarantine_block_size); | 1516 ASSERT_EQ(800000u, runtime->params().quarantine_block_size); |
1486 ASSERT_THAT(runtime->params().ignored_stack_ids_set, | 1517 ASSERT_THAT(runtime->params().ignored_stack_ids_set, |
1487 testing::ElementsAre(0x1, 0x2)); | 1518 testing::ElementsAre(0x1, 0x2)); |
1488 | 1519 |
1489 env->UnSetVar(::common::kSyzyAsanOptionsEnvVar); | 1520 env->UnSetVar(::common::kSyzyAsanOptionsEnvVar); |
1490 } | 1521 } |
1491 | 1522 |
1492 TEST_F(InstrumentAppIntegrationTest, FullOptimizedAsanEndToEnd) { | 1523 TEST_P(ParametrizedInstrumentAppIntegrationTest, FullOptimizedAsanEndToEnd) { |
1493 // Disable the heap checking as this implies touching all the shadow bytes | 1524 // Disable the heap checking as this implies touching all the shadow bytes |
1494 // and this make these tests really slow. | 1525 // and this make these tests really slow. |
1495 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); | 1526 cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure"); |
1496 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1527 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1497 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1528 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1498 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); | 1529 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll()); |
1499 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckInterceptedFunctions()); | 1530 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckInterceptedFunctions()); |
1500 } | 1531 } |
1501 | 1532 |
1502 TEST_F(InstrumentAppIntegrationTest, | 1533 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1503 AsanInvalidAccessWithCorruptAllocatedBlockHeader) { | 1534 AsanInvalidAccessWithCorruptAllocatedBlockHeader) { |
1504 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1535 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1505 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1536 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1506 OutOfProcessAsanErrorCheckAndValidateLog( | 1537 OutOfProcessAsanErrorCheckAndValidateLog( |
1507 testing::kAsanInvalidAccessWithCorruptAllocatedBlockHeader, true, | 1538 testing::kAsanInvalidAccessWithCorruptAllocatedBlockHeader, true, |
1508 kAsanCorruptHeap, NULL); | 1539 kAsanCorruptHeap, NULL); |
1509 } | 1540 } |
1510 | 1541 |
1511 TEST_F(InstrumentAppIntegrationTest, AsanOverflowCallsCrashForException) { | 1542 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1543 AsanOverflowCallsCrashForException) { | |
1512 // Asan-detected violations go through CrashForException if it is available. | 1544 // Asan-detected violations go through CrashForException if it is available. |
1513 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1545 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1514 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1546 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1515 int exit_code = | 1547 int exit_code = |
1516 RunOutOfProcessFunction(L"crash_for_exception_harness.exe", | 1548 RunOutOfProcessFunction(L"crash_for_exception_harness.exe", |
1517 testing::kAsanRead8BufferOverflow, true); | 1549 testing::kAsanRead8BufferOverflow, true); |
1518 EXPECT_EQ(kExeCrashForExceptionExitCode, exit_code); | 1550 EXPECT_EQ(kExeCrashForExceptionExitCode, exit_code); |
1519 } | 1551 } |
1520 | 1552 |
1521 TEST_F(InstrumentAppIntegrationTest, | 1553 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1522 AsanInvalidAccessWithCorruptAllocatedBlockTrailer) { | 1554 AsanInvalidAccessWithCorruptAllocatedBlockTrailer) { |
1523 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1555 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1524 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1556 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1525 OutOfProcessAsanErrorCheckAndValidateLog( | 1557 OutOfProcessAsanErrorCheckAndValidateLog( |
1526 testing::kAsanInvalidAccessWithCorruptAllocatedBlockTrailer, true, | 1558 testing::kAsanInvalidAccessWithCorruptAllocatedBlockTrailer, true, |
1527 kAsanCorruptHeap, NULL); | 1559 kAsanCorruptHeap, NULL); |
1528 } | 1560 } |
1529 | 1561 |
1530 TEST_F(InstrumentAppIntegrationTest, | 1562 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1531 AsanInvalidAccessWithCorruptFreedBlock) { | 1563 AsanInvalidAccessWithCorruptFreedBlock) { |
1532 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1564 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1533 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1565 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1534 OutOfProcessAsanErrorCheckAndValidateLog( | 1566 OutOfProcessAsanErrorCheckAndValidateLog( |
1535 testing::kAsanInvalidAccessWithCorruptFreedBlock, true, kAsanCorruptHeap, | 1567 testing::kAsanInvalidAccessWithCorruptFreedBlock, true, kAsanCorruptHeap, |
1536 NULL); | 1568 NULL); |
1537 } | 1569 } |
1538 | 1570 |
1539 TEST_F(InstrumentAppIntegrationTest, AsanCorruptBlockWithPageProtections) { | 1571 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1572 AsanCorruptBlockWithPageProtections) { | |
1540 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1573 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1541 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1574 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1542 OutOfProcessAsanErrorCheckAndValidateLog( | 1575 OutOfProcessAsanErrorCheckAndValidateLog( |
1543 testing::kAsanCorruptBlockWithPageProtections, true, | 1576 testing::kAsanCorruptBlockWithPageProtections, true, |
1544 kAsanHeapUseAfterFree, kAsanCorruptHeap); | 1577 kAsanHeapUseAfterFree, kAsanCorruptHeap); |
1545 } | 1578 } |
1546 | 1579 |
1547 TEST_F(InstrumentAppIntegrationTest, SampledAllocationsAsanEndToEnd) { | 1580 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1581 SampledAllocationsAsanEndToEnd) { | |
1548 cmd_line_.AppendSwitchASCII("asan-rtl-options", | 1582 cmd_line_.AppendSwitchASCII("asan-rtl-options", |
1549 "--allocation_guard_rate=0.5 " | 1583 "--allocation_guard_rate=0.5 " |
1550 "--no_check_heap_on_failure"); | 1584 "--no_check_heap_on_failure"); |
1551 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1585 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1552 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1586 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1553 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckSampledAllocations()); | 1587 ASSERT_NO_FATAL_FAILURE(AsanErrorCheckSampledAllocations()); |
1554 } | 1588 } |
1555 | 1589 |
1556 TEST_F(InstrumentAppIntegrationTest, AsanLargeBlockHeapEnabledTest) { | 1590 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1591 AsanLargeBlockHeapEnabledTest) { | |
1557 cmd_line_.AppendSwitchASCII("asan-rtl-options", | 1592 cmd_line_.AppendSwitchASCII("asan-rtl-options", |
1558 "--no_check_heap_on_failure " | 1593 "--no_check_heap_on_failure " |
1559 "--quarantine_size=4000000 " | 1594 "--quarantine_size=4000000 " |
1560 "--quarantine_block_size=2000000"); | 1595 "--quarantine_block_size=2000000"); |
1561 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1596 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1562 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1597 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1563 ASSERT_NO_FATAL_FAILURE(AsanLargeBlockHeapTests(true)); | 1598 ASSERT_NO_FATAL_FAILURE(AsanLargeBlockHeapTests(true)); |
1564 } | 1599 } |
1565 | 1600 |
1566 TEST_F(InstrumentAppIntegrationTest, AsanLargeBlockHeapDisabledTest) { | 1601 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1602 AsanLargeBlockHeapDisabledTest) { | |
1567 cmd_line_.AppendSwitchASCII("asan-rtl-options", | 1603 cmd_line_.AppendSwitchASCII("asan-rtl-options", |
1568 "--no_check_heap_on_failure " | 1604 "--no_check_heap_on_failure " |
1569 "--disable_large_block_heap"); | 1605 "--disable_large_block_heap"); |
1570 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1606 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1571 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1607 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1572 ASSERT_NO_FATAL_FAILURE(AsanLargeBlockHeapTests(false)); | 1608 ASSERT_NO_FATAL_FAILURE(AsanLargeBlockHeapTests(false)); |
1573 } | 1609 } |
1574 | 1610 |
1575 TEST_F(InstrumentAppIntegrationTest, AsanZebraHeapDisabledTest) { | 1611 TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanZebraHeapDisabledTest) { |
1576 AsanZebraHeapTest(false); | 1612 AsanZebraHeapTest(false); |
1577 } | 1613 } |
1578 | 1614 |
1579 TEST_F(InstrumentAppIntegrationTest, AsanZebraHeapEnabledTest) { | 1615 TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanZebraHeapEnabledTest) { |
1580 AsanZebraHeapTest(true); | 1616 AsanZebraHeapTest(true); |
1581 } | 1617 } |
1582 | 1618 |
1583 TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanBufferOverflow) { | 1619 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1620 AsanSymbolizerTestAsanBufferOverflow) { | |
1584 AsanSymbolizerTest(testing::kAsanRead8BufferOverflow, | 1621 AsanSymbolizerTest(testing::kAsanRead8BufferOverflow, |
1585 STRINGIFY(HEAP_BUFFER_OVERFLOW), | 1622 STRINGIFY(HEAP_BUFFER_OVERFLOW), |
1586 STRINGIFY(ASAN_READ_ACCESS), | 1623 STRINGIFY(ASAN_READ_ACCESS), |
1587 1, | 1624 1, |
1588 false); | 1625 false); |
1589 } | 1626 } |
1590 | 1627 |
1591 TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanBufferUnderflow) { | 1628 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1629 AsanSymbolizerTestAsanBufferUnderflow) { | |
1592 AsanSymbolizerTest(testing::kAsanWrite32BufferUnderflow, | 1630 AsanSymbolizerTest(testing::kAsanWrite32BufferUnderflow, |
1593 STRINGIFY(HEAP_BUFFER_UNDERFLOW), | 1631 STRINGIFY(HEAP_BUFFER_UNDERFLOW), |
1594 STRINGIFY(ASAN_WRITE_ACCESS), | 1632 STRINGIFY(ASAN_WRITE_ACCESS), |
1595 4, | 1633 4, |
1596 false); | 1634 false); |
1597 } | 1635 } |
1598 | 1636 |
1599 TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanUseAfterFree) { | 1637 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1638 AsanSymbolizerTestAsanUseAfterFree) { | |
1600 AsanSymbolizerTest(testing::kAsanRead64UseAfterFree, | 1639 AsanSymbolizerTest(testing::kAsanRead64UseAfterFree, |
1601 STRINGIFY(USE_AFTER_FREE), | 1640 STRINGIFY(USE_AFTER_FREE), |
1602 STRINGIFY(ASAN_READ_ACCESS), | 1641 STRINGIFY(ASAN_READ_ACCESS), |
1603 8, | 1642 8, |
1604 false); | 1643 false); |
1605 } | 1644 } |
1606 | 1645 |
1607 TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanCorruptBlock) { | 1646 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1647 AsanSymbolizerTestAsanCorruptBlock) { | |
1608 AsanSymbolizerTest(testing::kAsanCorruptBlock, | 1648 AsanSymbolizerTest(testing::kAsanCorruptBlock, |
1609 STRINGIFY(CORRUPT_BLOCK), | 1649 STRINGIFY(CORRUPT_BLOCK), |
1610 STRINGIFY(ASAN_UNKNOWN_ACCESS), | 1650 STRINGIFY(ASAN_UNKNOWN_ACCESS), |
1611 0, | 1651 0, |
1612 false); | 1652 false); |
1613 } | 1653 } |
1614 | 1654 |
1615 TEST_F(InstrumentAppIntegrationTest, | 1655 TEST_P(ParametrizedInstrumentAppIntegrationTest, |
1616 AsanSymbolizerTestAsanCorruptBlockInQuarantine) { | 1656 AsanSymbolizerTestAsanCorruptBlockInQuarantine) { |
1617 AsanSymbolizerTest(testing::kAsanCorruptBlockInQuarantine, | 1657 AsanSymbolizerTest(testing::kAsanCorruptBlockInQuarantine, |
1618 STRINGIFY(CORRUPT_BLOCK), | 1658 STRINGIFY(CORRUPT_BLOCK), |
1619 STRINGIFY(ASAN_UNKNOWN_ACCESS), | 1659 STRINGIFY(ASAN_UNKNOWN_ACCESS), |
1620 0, | 1660 0, |
1621 true); | 1661 true); |
1622 } | 1662 } |
1623 | 1663 |
1624 // These tests require corrupt heap checking to be enabled. | 1664 // These tests require corrupt heap checking to be enabled. |
1625 TEST_F(InstrumentAppIntegrationTest, AsanNearNullptrAccess) { | 1665 TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanNearNullptrAccess) { |
1626 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1666 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1627 | 1667 |
1628 OutOfProcessAsanErrorCheckAndValidateLog( | 1668 OutOfProcessAsanErrorCheckAndValidateLog( |
1629 testing::kAsanNearNullptrAccessHeapCorruptionInstrumented, true, | 1669 testing::kAsanNearNullptrAccessHeapCorruptionInstrumented, true, |
1630 kAsanHandlingException, kAsanNearNullptrAccessHeapCorruption); | 1670 kAsanHandlingException, kAsanNearNullptrAccessHeapCorruption); |
1631 OutOfProcessAsanErrorCheckAndValidateLog( | 1671 OutOfProcessAsanErrorCheckAndValidateLog( |
1632 testing::kAsanNearNullptrAccessHeapCorruptionUninstrumented, true, | 1672 testing::kAsanNearNullptrAccessHeapCorruptionUninstrumented, true, |
1633 kAsanHandlingException, kAsanNearNullptrAccessHeapCorruption); | 1673 kAsanHandlingException, kAsanNearNullptrAccessHeapCorruption); |
1634 OutOfProcessAsanErrorCheckAndValidateLog( | 1674 OutOfProcessAsanErrorCheckAndValidateLog( |
1635 testing::kAsanNearNullptrAccessNoHeapCorruptionInstrumented, true, | 1675 testing::kAsanNearNullptrAccessNoHeapCorruptionInstrumented, true, |
1636 kAsanHandlingException, kAsanNearNullptrAccessNoHeapCorruption); | 1676 kAsanHandlingException, kAsanNearNullptrAccessNoHeapCorruption); |
1637 OutOfProcessAsanErrorCheckAndValidateLog( | 1677 OutOfProcessAsanErrorCheckAndValidateLog( |
1638 testing::kAsanNearNullptrAccessNoHeapCorruptionUninstrumented, true, | 1678 testing::kAsanNearNullptrAccessNoHeapCorruptionUninstrumented, true, |
1639 kAsanHandlingException, kAsanNearNullptrAccessNoHeapCorruption); | 1679 kAsanHandlingException, kAsanNearNullptrAccessNoHeapCorruption); |
1640 OutOfProcessAsanErrorCheckAndValidateLog( | 1680 OutOfProcessAsanErrorCheckAndValidateLog( |
1641 testing::kAsanNullptrAccessNoHeapCorruptionUninstrumented, true, | 1681 testing::kAsanNullptrAccessNoHeapCorruptionUninstrumented, true, |
1642 kAsanHandlingException, kAsanNearNullptrAccessNoHeapCorruption); | 1682 kAsanHandlingException, kAsanNearNullptrAccessNoHeapCorruption); |
1643 } | 1683 } |
1644 | 1684 |
1685 // Instantiate the test cases only with SYZYGY until some problems are fixed. | |
1686 INSTANTIATE_TEST_CASE_P(InstantiationName, | |
1687 ParametrizedInstrumentAppIntegrationTest, | |
1688 testing::Values(SYZYGY)); | |
1689 | |
1645 TEST_F(InstrumentAppIntegrationTest, BBEntryEndToEnd) { | 1690 TEST_F(InstrumentAppIntegrationTest, BBEntryEndToEnd) { |
1646 ASSERT_NO_FATAL_FAILURE(StartService()); | 1691 ASSERT_NO_FATAL_FAILURE(StartService()); |
1647 ASSERT_NO_FATAL_FAILURE(EndToEndTest("bbentry")); | 1692 ASSERT_NO_FATAL_FAILURE(EndToEndTest("bbentry")); |
1648 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); | 1693 ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll()); |
1649 ASSERT_NO_FATAL_FAILURE(BBEntryInvokeTestDll()); | 1694 ASSERT_NO_FATAL_FAILURE(BBEntryInvokeTestDll()); |
1650 ASSERT_NO_FATAL_FAILURE(StopService()); | 1695 ASSERT_NO_FATAL_FAILURE(StopService()); |
1651 ASSERT_NO_FATAL_FAILURE(BBEntryCheckTestDll()); | 1696 ASSERT_NO_FATAL_FAILURE(BBEntryCheckTestDll()); |
1652 } | 1697 } |
1653 | 1698 |
1654 TEST_F(InstrumentAppIntegrationTest, BranchEndToEnd) { | 1699 TEST_F(InstrumentAppIntegrationTest, BranchEndToEnd) { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1743 | 1788 |
1744 TEST_F(InstrumentAppIntegrationTest, DeferredFreeTLS) { | 1789 TEST_F(InstrumentAppIntegrationTest, DeferredFreeTLS) { |
1745 ASSERT_NO_FATAL_FAILURE(StartService()); | 1790 ASSERT_NO_FATAL_FAILURE(StartService()); |
1746 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); | 1791 ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan")); |
1747 ASSERT_EQ(0, InvokeTestDllFunction(testing::kAsanDeferredFreeTLS)); | 1792 ASSERT_EQ(0, InvokeTestDllFunction(testing::kAsanDeferredFreeTLS)); |
1748 ASSERT_NO_FATAL_FAILURE(UnloadDll()); | 1793 ASSERT_NO_FATAL_FAILURE(UnloadDll()); |
1749 ASSERT_NO_FATAL_FAILURE(StopService()); | 1794 ASSERT_NO_FATAL_FAILURE(StopService()); |
1750 } | 1795 } |
1751 | 1796 |
1752 } // namespace integration_tests | 1797 } // namespace integration_tests |
OLD | NEW |