[PATCH] D29420: [libFuzzer] Isolate merge tests that require posix.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 13:43:49 PST 2017


AFAIK this is the only solution when you have a file where some tests
require one thing but another tests requires another thing.  You have to
split them out into different file so each file can have it's own REQUIRES
line.  kcc@, do you know of a better way?  Assuming this is the only way,
lgtm but wait for kcc.

On Wed, Feb 1, 2017 at 1:32 PM Marcos Pividori via Phabricator <
reviews at reviews.llvm.org> wrote:

> mpividori created this revision.
>
> https://reviews.llvm.org/D29420
>
> Files:
>   lib/Fuzzer/test/merge-posix.test
>   lib/Fuzzer/test/merge.test
>
>
> Index: lib/Fuzzer/test/merge.test
> ===================================================================
> --- lib/Fuzzer/test/merge.test
> +++ lib/Fuzzer/test/merge.test
> @@ -45,14 +45,6 @@
>  RUN: LLVMFuzzer-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2  -max_len=5
> 2>&1 | FileCheck %s --check-prefix=MERGE_LEN5
>  MERGE_LEN5: MERGE-OUTER: succesfull in 1 attempt(s)
>
> -# Check that we honor TMPDIR
> -RUN: TMPDIR=DIR_DOES_NOT_EXIST not LLVMFuzzer-FullCoverageSetTest
> -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=TMPDIR
> -TMPDIR: MERGE-OUTER: failed to write to the control file:
> DIR_DOES_NOT_EXIST/libFuzzerTemp
> -
> -# Check that we can report an error if file size exceeded
> -RUN: (ulimit -f 1; not LLVMFuzzer-FullCoverageSetTest -merge=1 %tmp/T1
> %tmp/T2 2>&1 | FileCheck %s --check-prefix=SIGXFSZ)
> -SIGXFSZ: ERROR: libFuzzer: file size exceeded
> -
>  RUN: rm -rf  %tmp/T1/* %tmp/T2/*
>  RUN: not LLVMFuzzer-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 |
> FileCheck %s --check-prefix=EMPTY
>  EMPTY: MERGE-OUTER: zero succesfull attempts, exiting
> Index: lib/Fuzzer/test/merge-posix.test
> ===================================================================
> --- /dev/null
> +++ lib/Fuzzer/test/merge-posix.test
> @@ -0,0 +1,17 @@
> +CHECK: BINGO
> +
> +RUN: rm -rf  %tmp/T1 %tmp/T2
> +RUN: mkdir -p %tmp/T1 %tmp/T2
> +RUN: echo F..... > %tmp/T1/1
> +RUN: echo .U.... > %tmp/T1/2
> +RUN: echo ..Z... > %tmp/T1/3
> +
> +# Check that we honor TMPDIR
> +RUN: TMPDIR=DIR_DOES_NOT_EXIST not LLVMFuzzer-FullCoverageSetTest
> -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=TMPDIR
> +TMPDIR: MERGE-OUTER: failed to write to the control file:
> DIR_DOES_NOT_EXIST/libFuzzerTemp
> +
> +# Check that we can report an error if file size exceeded
> +RUN: (ulimit -f 1; not LLVMFuzzer-FullCoverageSetTest -merge=1 %tmp/T1
> %tmp/T2 2>&1 | FileCheck %s --check-prefix=SIGXFSZ)
> +SIGXFSZ: ERROR: libFuzzer: file size exceeded
> +
> +REQUIRES: posix
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170201/2b86c124/attachment.html>


More information about the llvm-commits mailing list