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