Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1860)

Unified Diff: syzygy/integration_tests/instrument_integration_test.cc

Issue 2984303002: Split the testing class into two. (Closed)
Patch Set: Removed parametrization with Clang until the necessary fixes are done. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | syzygy/pe/unittest_util.h » ('j') | syzygy/pe/unittest_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/integration_tests/instrument_integration_test.cc
diff --git a/syzygy/integration_tests/instrument_integration_test.cc b/syzygy/integration_tests/instrument_integration_test.cc
index c53f0e1160712a626b3c0fba14c9659358ca1178..1e91b424ad5c3fafa5eda79ab1e654b8081cc37c 100644
--- a/syzygy/integration_tests/instrument_integration_test.cc
+++ b/syzygy/integration_tests/instrument_integration_test.cc
@@ -347,6 +347,11 @@ class TestingProfileGrinder : public grinder::grinders::ProfileGrinder {
using grinder::grinders::ProfileGrinder::parts_;
};
+enum InstrumentationMode {
+ SYZYGY,
+ CLANG,
+};
+
class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
public:
typedef testing::PELibUnitTest Super;
@@ -379,7 +384,7 @@ class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
base::FilePath abs_input_dll_path_ =
testing::GetExeRelativePath(testing::kIntegrationTestsDllName);
input_dll_path_ = testing::GetRelativePath(abs_input_dll_path_);
- output_dll_path_ = temp_dir_.Append(input_dll_path_.BaseName());
+ test_dll_path_ = temp_dir_.Append(input_dll_path_.BaseName());
Sébastien Marchand 2017/08/01 19:27:36 Don't set this here, as it'll be invalid for the C
njanevsk 2017/08/03 01:23:21 Done.
// Initialize call_service output directory for produced trace files.
traces_dir_ = temp_dir_.Append(L"traces");
@@ -420,18 +425,24 @@ class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
// Runs an instrumentation pass in the given mode and validates that the
// resulting output DLL loads.
- void EndToEndTest(const std::string& mode) {
- cmd_line_.AppendSwitchPath("input-image", input_dll_path_);
- cmd_line_.AppendSwitchPath("output-image", output_dll_path_);
- cmd_line_.AppendSwitchASCII("mode", mode);
-
- // Create the instrumented DLL.
- application::Application<instrument::InstrumentApp> app;
- ASSERT_NO_FATAL_FAILURE(ConfigureTestApp(&app));
- ASSERT_EQ(0, app.Run());
-
+ void EndToEndTest(const std::string& mode,
+ InstrumentationMode instrumentation_mode) {
+ if (instrumentation_mode == SYZYGY) {
+ cmd_line_.AppendSwitchPath("input-image", input_dll_path_);
+ cmd_line_.AppendSwitchPath("output-image", test_dll_path_);
+ cmd_line_.AppendSwitchASCII("mode", mode);
+
+ // Create the instrumented DLL.
+ application::Application<instrument::InstrumentApp> app;
+ ASSERT_NO_FATAL_FAILURE(ConfigureTestApp(&app));
+ ASSERT_EQ(0, app.Run());
+ } else if (instrumentation_mode == CLANG) {
Sébastien Marchand 2017/08/01 19:27:36 You don't need this yet as it's not instantiated.
njanevsk 2017/08/03 01:23:21 Done.
+ test_dll_path_ =
+ testing::GetExeRelativePath(testing::kIntegrationTestsClangDllName);
+ printf("%s\n", test_dll_path_.AsUTF8Unsafe().c_str());
Sébastien Marchand 2017/08/01 19:27:36 Remove the debugging code.
njanevsk 2017/08/03 01:23:21 Done.
+ }
// Validate that the test dll loads post instrumentation.
- ASSERT_NO_FATAL_FAILURE(LoadTestDll(output_dll_path_, &module_));
+ ASSERT_NO_FATAL_FAILURE(LoadTestDll(test_dll_path_, &module_));
}
// Invoke a test function inside test_dll by addressing it with a test id.
@@ -453,7 +464,7 @@ class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
base::FilePath harness = testing::GetExeRelativePath(harness_name.c_str());
base::CommandLine cmd_line(harness);
cmd_line.AppendSwitchASCII("test", base::StringPrintf("%d", test));
- cmd_line.AppendSwitchPath("dll", output_dll_path_);
+ cmd_line.AppendSwitchPath("dll", test_dll_path_);
if (expect_exception)
cmd_line.AppendSwitch("expect-exception");
@@ -575,10 +586,12 @@ class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
}
}
- void EndToEndCheckTestDll() {
- // Validate that behavior is unchanged after instrumentation.
- EXPECT_EQ(0xfff80200, InvokeTestDllFunction(testing::kArrayComputation1));
- EXPECT_EQ(0x00000200, InvokeTestDllFunction(testing::kArrayComputation2));
+ void EndToEndCheckTestDll(InstrumentationMode instrumentation_mode) {
+ if (instrumentation_mode == SYZYGY) {
Sébastien Marchand 2017/08/01 19:27:36 I don't sure that you need this check for now? You
njanevsk 2017/08/03 01:23:21 Done.
+ // Validate that behavior is unchanged after instrumentation.
+ EXPECT_EQ(0xfff80200, InvokeTestDllFunction(testing::kArrayComputation1));
+ EXPECT_EQ(0x00000200, InvokeTestDllFunction(testing::kArrayComputation2));
+ }
}
bool AsanErrorCheck(testing::EndToEndTestId test,
@@ -617,7 +630,7 @@ class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
if (asan_error_count == 0 && i + 1 < max_tries) {
// If the module was unloaded and the test is retrying, then reload it.
if (unload)
- EXPECT_NO_FATAL_FAILURE(LoadTestDll(output_dll_path_, &module_));
+ EXPECT_NO_FATAL_FAILURE(LoadTestDll(test_dll_path_, &module_));
continue;
}
@@ -880,8 +893,6 @@ class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
kAsanAccessViolationLog, kAsanHeapUseAfterFree);
}
- void AsanZebraHeapTest(bool enabled);
Sébastien Marchand 2017/08/01 19:27:36 Don't remove this function.
njanevsk 2017/08/03 01:23:21 I haven't removed it. I moved it to the Parametriz
Sébastien Marchand 2017/08/03 18:12:59 Why just this one and not the other Asan*Test func
Sébastien Marchand 2017/08/03 20:44:31 Ha, I just realized that this depends on some thin
Sébastien Marchand 2017/08/03 20:46:03 (the body of the function or the tests, it just fe
-
void BBEntryInvokeTestDll() {
EXPECT_EQ(42, InvokeTestDllFunction(testing::kBBEntryCallOnce));
EXPECT_EQ(42, InvokeTestDllFunction(testing::kBBEntryCallTree));
@@ -1179,6 +1190,53 @@ class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
FAIL() << "Didn't find GetMyRVA function entry.";
}
+ // Stashes the current log-level before each test instance and restores it
+ // after each test completes.
+ testing::ScopedLogLevelSaver log_level_saver;
+
+ // @name The application under test.
+ // @{
+ TestApp test_app_;
+ TestApp::Implementation& test_impl_;
+ base::FilePath temp_dir_;
+ base::FilePath stdin_path_;
+ base::FilePath stdout_path_;
+ base::FilePath stderr_path_;
+ // @}
+
+ // @name Command-line, parameters and outputs.
+ // @{
+ base::CommandLine cmd_line_;
+ base::FilePath input_dll_path_;
+ base::FilePath test_dll_path_;
+ base::FilePath traces_dir_;
+ // @}
+
+ // The test_dll module.
+ testing::ScopedHMODULE module_;
+
+ // Our call trace service process instance.
+ testing::CallTraceService service_;
+
+ // Decomposed image.
+ pe::PEFile pe_image_;
+ pe::ImageLayout image_layout_;
+ block_graph::BlockGraph block_graph_;
+ uint32_t get_my_rva_;
+};
+
+class ParametrizedLenientInstrumentAppIntegrationTest
+ : public LenientInstrumentAppIntegrationTest,
+ public ::testing::WithParamInterface<InstrumentationMode> {
+ public:
+ void EndToEndTest(const std::string& mode) {
+ LenientInstrumentAppIntegrationTest::EndToEndTest(mode, GetParam());
+ }
+ void AsanZebraHeapTest(bool enabled);
+
+ void EndToEndCheckTestDll() {
+ LenientInstrumentAppIntegrationTest::EndToEndCheckTestDll(GetParam());
+ }
// Helper function to test the Asan symbolizer script.
//
// It starts by running a test with the '--minidump_on_failure' flag turned
@@ -1250,41 +1308,11 @@ class LenientInstrumentAppIntegrationTest : public testing::PELibUnitTest {
env->UnSetVar(::common::kSyzyAsanOptionsEnvVar);
}
+};
- // Stashes the current log-level before each test instance and restores it
- // after each test completes.
- testing::ScopedLogLevelSaver log_level_saver;
-
- // @name The application under test.
- // @{
- TestApp test_app_;
- TestApp::Implementation& test_impl_;
- base::FilePath temp_dir_;
- base::FilePath stdin_path_;
- base::FilePath stdout_path_;
- base::FilePath stderr_path_;
- // @}
-
- // @name Command-line, parameters and outputs.
- // @{
- base::CommandLine cmd_line_;
- base::FilePath input_dll_path_;
- base::FilePath output_dll_path_;
- base::FilePath traces_dir_;
- // @}
-
- // The test_dll module.
- testing::ScopedHMODULE module_;
-
- // Our call trace service process instance.
- testing::CallTraceService service_;
+typedef testing::StrictMock<ParametrizedLenientInstrumentAppIntegrationTest>
+ ParametrizedInstrumentAppIntegrationTest;
- // Decomposed image.
- pe::PEFile pe_image_;
- pe::ImageLayout image_layout_;
- block_graph::BlockGraph block_graph_;
- uint32_t get_my_rva_;
-};
typedef testing::StrictMock<LenientInstrumentAppIntegrationTest>
InstrumentAppIntegrationTest;
@@ -1370,7 +1398,8 @@ void GetCallOffsets(const base::FilePath& image_path,
}
}
-void LenientInstrumentAppIntegrationTest::AsanZebraHeapTest(bool enabled) {
+void ParametrizedLenientInstrumentAppIntegrationTest::AsanZebraHeapTest(
+ bool enabled) {
// Find the offset of the call we want to instrument.
static const char kTest1[] =
"testing::AsanReadPageAllocationTrailerBeforeFree";
@@ -1407,7 +1436,7 @@ void LenientInstrumentAppIntegrationTest::AsanZebraHeapTest(bool enabled) {
} // namespace
-TEST_F(InstrumentAppIntegrationTest, AsanEndToEnd) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanEndToEnd) {
// Disable the heap checking as this is implies touching all the shadow bytes
// and this make those tests really slow.
cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure");
@@ -1417,7 +1446,7 @@ TEST_F(InstrumentAppIntegrationTest, AsanEndToEnd) {
ASSERT_NO_FATAL_FAILURE(CheckTestDllImportsRedirected());
}
-TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoLiveness) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanEndToEndNoLiveness) {
// Disable the heap checking as this is implies touching all the shadow bytes
// and this make those tests really slow.
cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure");
@@ -1427,7 +1456,8 @@ TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoLiveness) {
ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll());
}
-TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoRedundancyAnalysis) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanEndToEndNoRedundancyAnalysis) {
// Disable the heap checking as this is implies touching all the shadow bytes
// and this make those tests really slow.
cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure");
@@ -1437,7 +1467,8 @@ TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoRedundancyAnalysis) {
ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll());
}
-TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoFunctionInterceptors) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanEndToEndNoFunctionInterceptors) {
// Disable the heap checking as this is implies touching all the shadow bytes
// and this make those tests really slow.
cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure");
@@ -1447,7 +1478,7 @@ TEST_F(InstrumentAppIntegrationTest, AsanEndToEndNoFunctionInterceptors) {
ASSERT_NO_FATAL_FAILURE(AsanErrorCheckTestDll());
}
-TEST_F(InstrumentAppIntegrationTest, AsanEndToEndWithRtlOptions) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanEndToEndWithRtlOptions) {
cmd_line_.AppendSwitchASCII(
"asan-rtl-options",
"--quarantine_size=20000000 --quarantine_block_size=1000000 "
@@ -1463,7 +1494,7 @@ TEST_F(InstrumentAppIntegrationTest, AsanEndToEndWithRtlOptions) {
ASSERT_EQ(1000000u, runtime->params().quarantine_block_size);
}
-TEST_F(InstrumentAppIntegrationTest,
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
AsanEndToEndWithRtlOptionsOverrideWithEnvironment) {
std::unique_ptr<base::Environment> env(base::Environment::Create());
ASSERT_NE(env.get(), nullptr);
@@ -1489,7 +1520,7 @@ TEST_F(InstrumentAppIntegrationTest,
env->UnSetVar(::common::kSyzyAsanOptionsEnvVar);
}
-TEST_F(InstrumentAppIntegrationTest, FullOptimizedAsanEndToEnd) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest, FullOptimizedAsanEndToEnd) {
// Disable the heap checking as this implies touching all the shadow bytes
// and this make these tests really slow.
cmd_line_.AppendSwitchASCII("asan-rtl-options", "--no_check_heap_on_failure");
@@ -1499,7 +1530,7 @@ TEST_F(InstrumentAppIntegrationTest, FullOptimizedAsanEndToEnd) {
ASSERT_NO_FATAL_FAILURE(AsanErrorCheckInterceptedFunctions());
}
-TEST_F(InstrumentAppIntegrationTest,
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
AsanInvalidAccessWithCorruptAllocatedBlockHeader) {
ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan"));
ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
@@ -1508,7 +1539,8 @@ TEST_F(InstrumentAppIntegrationTest,
kAsanCorruptHeap, NULL);
}
-TEST_F(InstrumentAppIntegrationTest, AsanOverflowCallsCrashForException) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanOverflowCallsCrashForException) {
// Asan-detected violations go through CrashForException if it is available.
ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan"));
ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
@@ -1518,7 +1550,7 @@ TEST_F(InstrumentAppIntegrationTest, AsanOverflowCallsCrashForException) {
EXPECT_EQ(kExeCrashForExceptionExitCode, exit_code);
}
-TEST_F(InstrumentAppIntegrationTest,
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
AsanInvalidAccessWithCorruptAllocatedBlockTrailer) {
ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan"));
ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
@@ -1527,7 +1559,7 @@ TEST_F(InstrumentAppIntegrationTest,
kAsanCorruptHeap, NULL);
}
-TEST_F(InstrumentAppIntegrationTest,
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
AsanInvalidAccessWithCorruptFreedBlock) {
ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan"));
ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
@@ -1536,7 +1568,8 @@ TEST_F(InstrumentAppIntegrationTest,
NULL);
}
-TEST_F(InstrumentAppIntegrationTest, AsanCorruptBlockWithPageProtections) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanCorruptBlockWithPageProtections) {
ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan"));
ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
OutOfProcessAsanErrorCheckAndValidateLog(
@@ -1544,7 +1577,8 @@ TEST_F(InstrumentAppIntegrationTest, AsanCorruptBlockWithPageProtections) {
kAsanHeapUseAfterFree, kAsanCorruptHeap);
}
-TEST_F(InstrumentAppIntegrationTest, SampledAllocationsAsanEndToEnd) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ SampledAllocationsAsanEndToEnd) {
cmd_line_.AppendSwitchASCII("asan-rtl-options",
"--allocation_guard_rate=0.5 "
"--no_check_heap_on_failure");
@@ -1553,7 +1587,10 @@ TEST_F(InstrumentAppIntegrationTest, SampledAllocationsAsanEndToEnd) {
ASSERT_NO_FATAL_FAILURE(AsanErrorCheckSampledAllocations());
}
-TEST_F(InstrumentAppIntegrationTest, AsanLargeBlockHeapEnabledTest) {
+// The following two tests are timing out when instrumented and run with Clang.
Sébastien Marchand 2017/08/01 19:27:36 Remove this comment as you're not instantiating th
njanevsk 2017/08/03 01:23:21 Done.
+// TODO(njanevsk): Check why the tests are timing out.
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanLargeBlockHeapEnabledTest) {
cmd_line_.AppendSwitchASCII("asan-rtl-options",
"--no_check_heap_on_failure "
"--quarantine_size=4000000 "
@@ -1563,7 +1600,8 @@ TEST_F(InstrumentAppIntegrationTest, AsanLargeBlockHeapEnabledTest) {
ASSERT_NO_FATAL_FAILURE(AsanLargeBlockHeapTests(true));
}
-TEST_F(InstrumentAppIntegrationTest, AsanLargeBlockHeapDisabledTest) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanLargeBlockHeapDisabledTest) {
cmd_line_.AppendSwitchASCII("asan-rtl-options",
"--no_check_heap_on_failure "
"--disable_large_block_heap");
@@ -1572,15 +1610,16 @@ TEST_F(InstrumentAppIntegrationTest, AsanLargeBlockHeapDisabledTest) {
ASSERT_NO_FATAL_FAILURE(AsanLargeBlockHeapTests(false));
}
-TEST_F(InstrumentAppIntegrationTest, AsanZebraHeapDisabledTest) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanZebraHeapDisabledTest) {
AsanZebraHeapTest(false);
}
-TEST_F(InstrumentAppIntegrationTest, AsanZebraHeapEnabledTest) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanZebraHeapEnabledTest) {
AsanZebraHeapTest(true);
}
-TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanBufferOverflow) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanSymbolizerTestAsanBufferOverflow) {
AsanSymbolizerTest(testing::kAsanRead8BufferOverflow,
STRINGIFY(HEAP_BUFFER_OVERFLOW),
STRINGIFY(ASAN_READ_ACCESS),
@@ -1588,7 +1627,8 @@ TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanBufferOverflow) {
false);
}
-TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanBufferUnderflow) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanSymbolizerTestAsanBufferUnderflow) {
AsanSymbolizerTest(testing::kAsanWrite32BufferUnderflow,
STRINGIFY(HEAP_BUFFER_UNDERFLOW),
STRINGIFY(ASAN_WRITE_ACCESS),
@@ -1596,7 +1636,8 @@ TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanBufferUnderflow) {
false);
}
-TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanUseAfterFree) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanSymbolizerTestAsanUseAfterFree) {
AsanSymbolizerTest(testing::kAsanRead64UseAfterFree,
STRINGIFY(USE_AFTER_FREE),
STRINGIFY(ASAN_READ_ACCESS),
@@ -1604,7 +1645,8 @@ TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanUseAfterFree) {
false);
}
-TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanCorruptBlock) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
+ AsanSymbolizerTestAsanCorruptBlock) {
AsanSymbolizerTest(testing::kAsanCorruptBlock,
STRINGIFY(CORRUPT_BLOCK),
STRINGIFY(ASAN_UNKNOWN_ACCESS),
@@ -1612,7 +1654,7 @@ TEST_F(InstrumentAppIntegrationTest, AsanSymbolizerTestAsanCorruptBlock) {
false);
}
-TEST_F(InstrumentAppIntegrationTest,
+TEST_P(ParametrizedInstrumentAppIntegrationTest,
AsanSymbolizerTestAsanCorruptBlockInQuarantine) {
AsanSymbolizerTest(testing::kAsanCorruptBlockInQuarantine,
STRINGIFY(CORRUPT_BLOCK),
@@ -1622,7 +1664,7 @@ TEST_F(InstrumentAppIntegrationTest,
}
// These tests require corrupt heap checking to be enabled.
-TEST_F(InstrumentAppIntegrationTest, AsanNearNullptrAccess) {
+TEST_P(ParametrizedInstrumentAppIntegrationTest, AsanNearNullptrAccess) {
ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan"));
OutOfProcessAsanErrorCheckAndValidateLog(
@@ -1642,10 +1684,15 @@ TEST_F(InstrumentAppIntegrationTest, AsanNearNullptrAccess) {
kAsanHandlingException, kAsanNearNullptrAccessNoHeapCorruption);
}
+// Instantiate the test cases only with SYZYGY until some problems are fixed.
+INSTANTIATE_TEST_CASE_P(InstantiationName,
+ ParametrizedInstrumentAppIntegrationTest,
+ testing::Values(SYZYGY));
+
TEST_F(InstrumentAppIntegrationTest, BBEntryEndToEnd) {
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("bbentry"));
- ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("bbentry", SYZYGY));
Sébastien Marchand 2017/08/01 19:27:36 I'm not such a fan of having all these extra "SYZY
njanevsk 2017/08/03 01:23:21 Done.
+ ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll(SYZYGY));
ASSERT_NO_FATAL_FAILURE(BBEntryInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(StopService());
ASSERT_NO_FATAL_FAILURE(BBEntryCheckTestDll());
@@ -1653,8 +1700,8 @@ TEST_F(InstrumentAppIntegrationTest, BBEntryEndToEnd) {
TEST_F(InstrumentAppIntegrationTest, BranchEndToEnd) {
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("branch"));
- ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("branch", SYZYGY));
+ ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll(SYZYGY));
ASSERT_NO_FATAL_FAILURE(BBEntryInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(UnloadDll());
ASSERT_NO_FATAL_FAILURE(StopService());
@@ -1664,8 +1711,8 @@ TEST_F(InstrumentAppIntegrationTest, BranchEndToEnd) {
TEST_F(InstrumentAppIntegrationTest, BranchWithBufferingEndToEnd) {
cmd_line_.AppendSwitch("buffering");
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("branch"));
- ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("branch", SYZYGY));
+ ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll(SYZYGY));
ASSERT_NO_FATAL_FAILURE(BBEntryInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(UnloadDll());
ASSERT_NO_FATAL_FAILURE(StopService());
@@ -1675,8 +1722,8 @@ TEST_F(InstrumentAppIntegrationTest, BranchWithBufferingEndToEnd) {
TEST_F(InstrumentAppIntegrationTest, BranchWithSlotEndToEnd) {
cmd_line_.AppendSwitchASCII("fs-slot", "1");
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("branch"));
- ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("branch", SYZYGY));
+ ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll(SYZYGY));
ASSERT_NO_FATAL_FAILURE(BBEntryInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(UnloadDll());
ASSERT_NO_FATAL_FAILURE(StopService());
@@ -1687,8 +1734,8 @@ TEST_F(InstrumentAppIntegrationTest, BranchWithSlotAndBufferingEndToEnd) {
cmd_line_.AppendSwitch("buffering");
cmd_line_.AppendSwitchASCII("fs-slot", "1");
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("branch"));
- ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("branch", SYZYGY));
+ ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll(SYZYGY));
ASSERT_NO_FATAL_FAILURE(BBEntryInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(UnloadDll());
ASSERT_NO_FATAL_FAILURE(StopService());
@@ -1696,15 +1743,15 @@ TEST_F(InstrumentAppIntegrationTest, BranchWithSlotAndBufferingEndToEnd) {
}
TEST_F(InstrumentAppIntegrationTest, CallTraceEndToEnd) {
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("calltrace"));
- ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("calltrace", SYZYGY));
+ ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll(SYZYGY));
}
TEST_F(InstrumentAppIntegrationTest, CoverageEndToEnd) {
base::win::ScopedCOMInitializer scoped_com_initializer;
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("coverage"));
- ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("coverage", SYZYGY));
+ ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll(SYZYGY));
ASSERT_NO_FATAL_FAILURE(CoverageInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(StopService());
ASSERT_NO_FATAL_FAILURE(CoverageCheckTestDll());
@@ -1715,8 +1762,8 @@ TEST_F(InstrumentAppIntegrationTest, BBEntryCoverageEndToEnd) {
// instrumentation.
base::win::ScopedCOMInitializer scoped_com_initializer;
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("bbentry"));
- ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll());
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("bbentry", SYZYGY));
+ ASSERT_NO_FATAL_FAILURE(EndToEndCheckTestDll(SYZYGY));
ASSERT_NO_FATAL_FAILURE(CoverageInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(StopService());
ASSERT_NO_FATAL_FAILURE(CoverageCheckTestDll());
@@ -1724,7 +1771,7 @@ TEST_F(InstrumentAppIntegrationTest, BBEntryCoverageEndToEnd) {
TEST_F(InstrumentAppIntegrationTest, ProfileEndToEnd) {
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("profile"));
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("profile", SYZYGY));
ASSERT_NO_FATAL_FAILURE(ProfileInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(UnloadDll());
ASSERT_NO_FATAL_FAILURE(StopService());
@@ -1734,7 +1781,7 @@ TEST_F(InstrumentAppIntegrationTest, ProfileEndToEnd) {
TEST_F(InstrumentAppIntegrationTest, ProfileWithImportsEndToEnd) {
cmd_line_.AppendSwitch("instrument-imports");
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("profile"));
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("profile", SYZYGY));
ASSERT_NO_FATAL_FAILURE(ProfileInvokeTestDll());
ASSERT_NO_FATAL_FAILURE(UnloadDll());
ASSERT_NO_FATAL_FAILURE(StopService());
@@ -1743,7 +1790,7 @@ TEST_F(InstrumentAppIntegrationTest, ProfileWithImportsEndToEnd) {
TEST_F(InstrumentAppIntegrationTest, DeferredFreeTLS) {
ASSERT_NO_FATAL_FAILURE(StartService());
- ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan"));
+ ASSERT_NO_FATAL_FAILURE(EndToEndTest("asan", SYZYGY));
ASSERT_EQ(0, InvokeTestDllFunction(testing::kAsanDeferredFreeTLS));
ASSERT_NO_FATAL_FAILURE(UnloadDll());
ASSERT_NO_FATAL_FAILURE(StopService());
« no previous file with comments | « no previous file | syzygy/pe/unittest_util.h » ('j') | syzygy/pe/unittest_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698