]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/fuzzer/minimize_two_crashes.test
Vendor import of compiler-rt trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / fuzzer / minimize_two_crashes.test
1 # Test that the minimizer stops when it sees a different bug.
2 UNSUPPORTED: freebsd,windows
3
4 # TODO: Find out why test fails on Darwin with -O2.
5 RUN: %cpp_compiler -O0 %S/TwoDifferentBugsTest.cpp -o %t-TwoDifferentBugsTest
6
7 RUN: rm -rf %t && mkdir %t
8 RUN: echo H12345678901234667888090 > %t/long_crash
9 RUN: env ASAN_OPTIONS=dedup_token_length=3 %run %t-TwoDifferentBugsTest -seed=1 -minimize_crash=1 %t/long_crash -exact_artifact_path=%t/result 2>&1 | FileCheck %s
10
11 CHECK: DedupToken1: DEDUP_TOKEN: Bar
12 CHECK: DedupToken2: DEDUP_TOKEN: Bar
13 CHECK: DedupToken1: DEDUP_TOKEN: Bar
14 CHECK: DedupToken2: DEDUP_TOKEN: Foo
15 CHECK: CRASH_MIN: mismatch in dedup tokens
16
17 RUN: not  %run %t-TwoDifferentBugsTest %t/result 2>&1 | FileCheck %s --check-prefix=VERIFY
18
19 VERIFY: ERROR: AddressSanitizer:
20 VERIFY: in Bar