Commit 72c3ebe
committed
overflow: Refactor test skips for Clang-specific issues
Convert test exclusion into test skipping. This brings the logic for
why a test is being skipped into the test itself, instead of having to
spread ifdefs around the code. This will make cleanup easier as minimum
tests get raised. Drop __maybe_unused so missed tests will be noticed
again and clean up whitespace.
For example, clang-11 on i386:
[15:52:32] ================== overflow (18 subtests) ==================
[15:52:32] [PASSED] u8_u8__u8_overflow_test
[15:52:32] [PASSED] s8_s8__s8_overflow_test
[15:52:32] [PASSED] u16_u16__u16_overflow_test
[15:52:32] [PASSED] s16_s16__s16_overflow_test
[15:52:32] [PASSED] u32_u32__u32_overflow_test
[15:52:32] [PASSED] s32_s32__s32_overflow_test
[15:52:32] [SKIPPED] u64_u64__u64_overflow_test
[15:52:32] [SKIPPED] s64_s64__s64_overflow_test
[15:52:32] [SKIPPED] u32_u32__int_overflow_test
[15:52:32] [PASSED] u32_u32__u8_overflow_test
[15:52:32] [PASSED] u8_u8__int_overflow_test
[15:52:32] [PASSED] int_int__u8_overflow_test
[15:52:32] [PASSED] shift_sane_test
[15:52:32] [PASSED] shift_overflow_test
[15:52:32] [PASSED] shift_truncate_test
[15:52:32] [PASSED] shift_nonsense_test
[15:52:32] [PASSED] overflow_allocation_test
[15:52:32] [PASSED] overflow_size_helpers_test
[15:52:32] ==================== [PASSED] overflow =====================
[15:52:32] ============================================================
[15:52:32] Testing complete. Ran 18 tests: passed: 15, skipped: 3
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Tom Rix <trix@redhat.com>
Cc: Daniel Latypov <dlatypov@google.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: llvm@lists.linux.dev
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20221006230017.1833458-1-keescook@chromium.org1 parent 0e5b9f2 commit 72c3ebe
1 file changed
Lines changed: 35 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
19 | 47 | | |
20 | 48 | | |
21 | 49 | | |
| |||
94 | 122 | | |
95 | 123 | | |
96 | 124 | | |
97 | | - | |
98 | 125 | | |
99 | 126 | | |
100 | 127 | | |
| |||
118 | 145 | | |
119 | 146 | | |
120 | 147 | | |
121 | | - | |
122 | 148 | | |
123 | 149 | | |
124 | 150 | | |
| |||
194 | 220 | | |
195 | 221 | | |
196 | 222 | | |
197 | | - | |
198 | 223 | | |
199 | 224 | | |
200 | 225 | | |
| |||
223 | 248 | | |
224 | 249 | | |
225 | 250 | | |
226 | | - | |
227 | 251 | | |
228 | 252 | | |
229 | 253 | | |
| |||
246 | 270 | | |
247 | 271 | | |
248 | 272 | | |
249 | | - | |
| 273 | + | |
250 | 274 | | |
251 | 275 | | |
252 | 276 | | |
253 | 277 | | |
254 | 278 | | |
255 | 279 | | |
256 | 280 | | |
257 | | - | |
258 | 281 | | |
259 | 282 | | |
260 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
261 | 290 | | |
262 | 291 | | |
263 | 292 | | |
| |||
273 | 302 | | |
274 | 303 | | |
275 | 304 | | |
276 | | - | |
277 | 305 | | |
278 | 306 | | |
279 | | - | |
280 | 307 | | |
281 | 308 | | |
282 | 309 | | |
| |||
716 | 743 | | |
717 | 744 | | |
718 | 745 | | |
719 | | - | |
720 | | - | |
721 | 746 | | |
722 | 747 | | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | 748 | | |
730 | | - | |
731 | 749 | | |
732 | 750 | | |
733 | 751 | | |
| |||
0 commit comments