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

Side by Side Diff: syzygy/integration_tests/integration_tests_dll.h

Issue 2972893002: Split the integration test cases into asan and non asan. (Closed)
Patch Set: Split the integration test cases into asan and non asan. 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 unified diff | Download patch
« no previous file with comments | « no previous file | syzygy/integration_tests/integration_tests_dll.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 // 14 //
15 // This file declares the entry point for the different end to end 15 // This file declares the entry point for the different end to end
16 // instrumentation tests. 16 // instrumentation tests.
17 #ifndef SYZYGY_INTEGRATION_TESTS_INTEGRATION_TESTS_DLL_H_ 17 #ifndef SYZYGY_INTEGRATION_TESTS_INTEGRATION_TESTS_DLL_H_
18 #define SYZYGY_INTEGRATION_TESTS_INTEGRATION_TESTS_DLL_H_ 18 #define SYZYGY_INTEGRATION_TESTS_INTEGRATION_TESTS_DLL_H_
19 19
20 #include <stdint.h> 20 #include <stdint.h>
21 21
22 namespace testing { 22 namespace testing {
23 23
24 // This macro declares the tests ids and the function that they're associated 24 // This macro declares the SyzyAsan tests ids and the function that they're
25 // with. 25 // associated with.
26 #define END_TO_END_TEST_ID_TABLE(decl) \ 26 #define END_TO_END_ASAN_TESTS(decl) \
27 decl(kArrayComputation1, testing::ArrayComputation1) \
28 decl(kArrayComputation2, testing::ArrayComputation2) \
29 decl(kAsanRead8BufferOverflow, testing::AsanReadBufferOverflow<int8_t>) \ 27 decl(kAsanRead8BufferOverflow, testing::AsanReadBufferOverflow<int8_t>) \
30 decl(kAsanRead16BufferOverflow, testing::AsanReadBufferOverflow<int16_t>) \ 28 decl(kAsanRead16BufferOverflow, testing::AsanReadBufferOverflow<int16_t>) \
31 decl(kAsanRead32BufferOverflow, testing::AsanReadBufferOverflow<int32_t>) \ 29 decl(kAsanRead32BufferOverflow, testing::AsanReadBufferOverflow<int32_t>) \
32 decl(kAsanRead64BufferOverflow, testing::AsanReadBufferOverflow<double>) \ 30 decl(kAsanRead64BufferOverflow, testing::AsanReadBufferOverflow<double>) \
33 decl(kAsanRead8BufferUnderflow, testing::AsanReadBufferUnderflow<int8_t>) \ 31 decl(kAsanRead8BufferUnderflow, testing::AsanReadBufferUnderflow<int8_t>) \
34 decl(kAsanRead16BufferUnderflow, \ 32 decl(kAsanRead16BufferUnderflow, \
35 testing::AsanReadBufferUnderflow<int16_t>) \ 33 testing::AsanReadBufferUnderflow<int16_t>) \
36 decl(kAsanRead32BufferUnderflow, \ 34 decl(kAsanRead32BufferUnderflow, \
37 testing::AsanReadBufferUnderflow<int32_t>) \ 35 testing::AsanReadBufferUnderflow<int32_t>) \
38 decl(kAsanRead64BufferUnderflow, \ 36 decl(kAsanRead64BufferUnderflow, \
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 decl(kAsanStrncatDstOverflow, testing::AsanStrncatDstOverflow) \ 141 decl(kAsanStrncatDstOverflow, testing::AsanStrncatDstOverflow) \
144 decl(kAsanStrncatDstUnderflow, testing::AsanStrncatDstUnderflow) \ 142 decl(kAsanStrncatDstUnderflow, testing::AsanStrncatDstUnderflow) \
145 decl(kAsanStrncatDstUseAfterFree, testing::AsanStrncatDstUseAfterFree) \ 143 decl(kAsanStrncatDstUseAfterFree, testing::AsanStrncatDstUseAfterFree) \
146 decl(kAsanReadFileOverflow, testing::AsanReadFileOverflow) \ 144 decl(kAsanReadFileOverflow, testing::AsanReadFileOverflow) \
147 decl(kAsanReadFileUseAfterFree, testing::AsanReadFileUseAfterFree) \ 145 decl(kAsanReadFileUseAfterFree, testing::AsanReadFileUseAfterFree) \
148 decl(kAsanWriteFileOverflow, testing::AsanWriteFileOverflow) \ 146 decl(kAsanWriteFileOverflow, testing::AsanWriteFileOverflow) \
149 decl(kAsanWriteFileUseAfterFree, testing::AsanWriteFileUseAfterFree) \ 147 decl(kAsanWriteFileUseAfterFree, testing::AsanWriteFileUseAfterFree) \
150 decl(kAsanCorruptBlock, testing::AsanCorruptBlock) \ 148 decl(kAsanCorruptBlock, testing::AsanCorruptBlock) \
151 decl(kAsanCorruptBlockInQuarantine, \ 149 decl(kAsanCorruptBlockInQuarantine, \
152 testing::AsanCorruptBlockInQuarantine) \ 150 testing::AsanCorruptBlockInQuarantine) \
153 decl(kBBEntryCallOnce, BBEntryCallOnce) \
154 decl(kBBEntryCallTree, BBEntryCallTree) \
155 decl(kBBEntryCallRecursive, BBEntryCallRecursive) \
156 decl(kCoverage1, testing::coverage_func1) \
157 decl(kCoverage2, testing::coverage_func2) \
158 decl(kCoverage3, testing::coverage_func3) \
159 decl(kProfileCallExport, testing::CallExportedFunction) \
160 decl(kProfileGetMyRVA, testing::GetMyRVA) \
161 decl(kAsanInvalidAccessWithCorruptAllocatedBlockHeader, \ 151 decl(kAsanInvalidAccessWithCorruptAllocatedBlockHeader, \
162 testing::AsanInvalidAccessWithCorruptAllocatedBlockHeader) \ 152 testing::AsanInvalidAccessWithCorruptAllocatedBlockHeader) \
163 decl(kAsanInvalidAccessWithCorruptAllocatedBlockTrailer, \ 153 decl(kAsanInvalidAccessWithCorruptAllocatedBlockTrailer, \
164 testing::AsanInvalidAccessWithCorruptAllocatedBlockTrailer) \ 154 testing::AsanInvalidAccessWithCorruptAllocatedBlockTrailer) \
165 decl(kAsanInvalidAccessWithCorruptFreedBlock, \ 155 decl(kAsanInvalidAccessWithCorruptFreedBlock, \
166 testing::AsanInvalidAccessWithCorruptFreedBlock) \ 156 testing::AsanInvalidAccessWithCorruptFreedBlock) \
167 decl(kAsanReadLargeAllocationTrailerBeforeFree, \ 157 decl(kAsanReadLargeAllocationTrailerBeforeFree, \
168 testing::AsanReadLargeAllocationTrailerBeforeFree) \ 158 testing::AsanReadLargeAllocationTrailerBeforeFree) \
169 decl(kAsanReadLargeAllocationBodyAfterFree, \ 159 decl(kAsanReadLargeAllocationBodyAfterFree, \
170 testing::AsanReadLargeAllocationBodyAfterFree) \ 160 testing::AsanReadLargeAllocationBodyAfterFree) \
171 decl(kAsanReadPageAllocationTrailerBeforeFreeAllocation, \ 161 decl(kAsanReadPageAllocationTrailerBeforeFreeAllocation, \
172 testing::AsanReadPageAllocationTrailerBeforeFree) \ 162 testing::AsanReadPageAllocationTrailerBeforeFree) \
173 decl(kAsanWritePageAllocationBodyAfterFree, \ 163 decl(kAsanWritePageAllocationBodyAfterFree, \
174 testing::AsanWritePageAllocationBodyAfterFree) \ 164 testing::AsanWritePageAllocationBodyAfterFree) \
175 decl(kAsanMemcmpAccessViolation, testing::AsanMemcmpAccessViolation) \ 165 decl(kAsanMemcmpAccessViolation, testing::AsanMemcmpAccessViolation) \
176 decl(kAsanCorruptBlockWithPageProtections, \ 166 decl(kAsanCorruptBlockWithPageProtections, \
177 testing::AsanCorruptBlockWithPageProtections) \ 167 testing::AsanCorruptBlockWithPageProtections) \
178 decl(kAsanNearNullptrAccessHeapCorruptionInstrumented, \ 168 decl(kAsanNearNullptrAccessHeapCorruptionInstrumented, \
179 testing::AsanNearNullptrAccessHeapCorruptionInstrumented) \ 169 testing::AsanNearNullptrAccessHeapCorruptionInstrumented) \
180 decl(kAsanNearNullptrAccessHeapCorruptionUninstrumented, \ 170 decl(kAsanNearNullptrAccessHeapCorruptionUninstrumented, \
181 testing::AsanNearNullptrAccessHeapCorruptionUninstrumented) \ 171 testing::AsanNearNullptrAccessHeapCorruptionUninstrumented) \
182 decl(kAsanNearNullptrAccessNoHeapCorruptionInstrumented, \ 172 decl(kAsanNearNullptrAccessNoHeapCorruptionInstrumented, \
183 testing::AsanNearNullptrAccessNoHeapCorruptionInstrumented) \ 173 testing::AsanNearNullptrAccessNoHeapCorruptionInstrumented) \
184 decl(kAsanNearNullptrAccessNoHeapCorruptionUninstrumented, \ 174 decl(kAsanNearNullptrAccessNoHeapCorruptionUninstrumented, \
185 testing::AsanNearNullptrAccessNoHeapCorruptionUninstrumented) \ 175 testing::AsanNearNullptrAccessNoHeapCorruptionUninstrumented) \
186 decl(kAsanNullptrAccessNoHeapCorruptionUninstrumented, \ 176 decl(kAsanNullptrAccessNoHeapCorruptionUninstrumented, \
187 testing::AsanNullptrAccessNoHeapCorruptionUninstrumented) \ 177 testing::AsanNullptrAccessNoHeapCorruptionUninstrumented) \
188 decl(kAsanDeferredFreeTLS, testing::AsanDeferredFreeTLS) 178 decl(kAsanDeferredFreeTLS, testing::AsanDeferredFreeTLS)
189 179
180 // This macro declares the non SyzyAsan tests ids and the function that they're
181 // associated with.
182 #define END_TO_END_NON_ASAN_TESTS(decl) \
183 decl(kArrayComputation1, testing::ArrayComputation1) \
184 decl(kArrayComputation2, testing::ArrayComputation2) \
185 decl(kBBEntryCallOnce, BBEntryCallOnce) \
186 decl(kBBEntryCallTree, BBEntryCallTree) \
187 decl(kBBEntryCallRecursive, BBEntryCallRecursive) \
188 decl(kCoverage1, testing::coverage_func1) \
189 decl(kCoverage2, testing::coverage_func2) \
190 decl(kCoverage3, testing::coverage_func3) \
191 decl(kProfileCallExport, testing::CallExportedFunction) \
192 decl(kProfileGetMyRVA, testing::GetMyRVA)
193
194 // Only run the Asan tests for the Clang builds
Sébastien Marchand 2017/07/06 19:05:40 Missing period :)
195 #ifdef __clang__
196 #define END_TO_END_TEST_ID_TABLE(decl) END_TO_END_ASAN_TESTS(decl)
197 #else
198 #define END_TO_END_TEST_ID_TABLE(decl) \
199 END_TO_END_NON_ASAN_TESTS(decl) END_TO_END_ASAN_TESTS(decl)
200 #endif // __clang__
201
190 // This enumeration contains an unique id for each end to end test. It is used 202 // This enumeration contains an unique id for each end to end test. It is used
191 // to perform an indirect call through the DLL entry point 'EndToEndTest'. 203 // to perform an indirect call through the DLL entry point 'EndToEndTest'.
192 enum EndToEndTestId { 204 enum EndToEndTestId {
193 #define DECLARE_END_TO_END_ENUM(enum_name, function_to_call) enum_name, 205 #define DECLARE_END_TO_END_ENUM(enum_name, function_to_call) enum_name,
194 END_TO_END_TEST_ID_TABLE(DECLARE_END_TO_END_ENUM) 206 END_TO_END_TEST_ID_TABLE(DECLARE_END_TO_END_ENUM)
195 #undef DECLARE_END_TO_END_ENUM 207 #undef DECLARE_END_TO_END_ENUM
196 }; 208 };
197 209
198 } // namespace testing 210 } // namespace testing
199 211
200 #endif // SYZYGY_INTEGRATION_TESTS_INTEGRATION_TESTS_DLL_H_ 212 #endif // SYZYGY_INTEGRATION_TESTS_INTEGRATION_TESTS_DLL_H_
OLDNEW
« no previous file with comments | « no previous file | syzygy/integration_tests/integration_tests_dll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698