1# Tests -focus_function 2# 3# TODO: don't require linux. 4# REQUIRES: linux 5UNSUPPORTED: aarch64 6 7RUN: %cpp_compiler %S/OnlySomeBytesTest.cpp -o %t-exe 8 9RUN: %t-exe -runs=100 2>&1 | FileCheck %s --check-prefix=FOCUS_NONE 10FOCUS_NONE-NOT: INFO: Focus function is set to 11FOCUS_NONE-NOT: INFO: {{.*}} inputs touch the focus function 12 13RUN: not %t-exe -runs=100 -focus_function=WRONG 2>&1 | FileCheck %s --check-prefix=FOCUS_WRONG 14FOCUS_WRONG-NOT: INFO: Focus function is set to 15FOCUS_WRONG: ERROR: Failed to set focus function 16 17RUN: %t-exe -runs=100 -focus_function=f0 2>&1 | FileCheck %s --check-prefix=FOCUS_F0 18FOCUS_F0: INFO: Focus function is set to 'f0' 19FOCUS_F0: INFO: 0/1 inputs touch the focus function 20 21RUN: rm -rf %t-corpus 22RUN: mkdir %t-corpus 23# ABC triggers the focus function, others don't. 24RUN: echo ABC$(for((i=0;i<2048;i++)); do echo -n x; done) > %t-corpus/ABC 25RUN: echo AXY$(for((i=0;i<2048;i++)); do echo -n x; done) > %t-corpus/AXY 26RUN: echo ABX$(for((i=0;i<2048;i++)); do echo -n x; done) > %t-corpus/ABX 27 28RUN: %t-exe -runs=10000 -focus_function=f0 %t-corpus 2>&1 | FileCheck %s --check-prefix=CORPUS_1_3 29CORPUS_1_3: INFO: 1/3 inputs touch the focus function 30CORPUS_1_3: DONE {{.*}} focus: 31