Skip to content

Commit aa503f6

Browse files
authored
[compiler-rt][libFuzzer] Add %run directives to focus-function.test (#153185)
Contrary to most testcases in the libFuzzer test suite, `focus-function.test` seems to lack the `%run` directives, which is an inconvenience in cases when `%run` actually gets substituted for something. This PR adds said directives.
1 parent ace08d5 commit aa503f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler-rt/test/fuzzer/focus-function.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ UNSUPPORTED: target=aarch64{{.*}}
77

88
RUN: %cpp_compiler %S/OnlySomeBytesTest.cpp -o %t-exe
99

10-
RUN: %t-exe -runs=100 2>&1 | FileCheck %s --check-prefix=FOCUS_NONE
10+
RUN: %run %t-exe -runs=100 2>&1 | FileCheck %s --check-prefix=FOCUS_NONE
1111
FOCUS_NONE-NOT: INFO: Focus function is set to
1212
FOCUS_NONE-NOT: INFO: {{.*}} inputs touch the focus function
1313

14-
RUN: not %t-exe -runs=100 -focus_function=WRONG 2>&1 | FileCheck %s --check-prefix=FOCUS_WRONG
14+
RUN: not %run %t-exe -runs=100 -focus_function=WRONG 2>&1 | FileCheck %s --check-prefix=FOCUS_WRONG
1515
FOCUS_WRONG-NOT: INFO: Focus function is set to
1616
FOCUS_WRONG: ERROR: Failed to set focus function
1717

18-
RUN: %t-exe -runs=100 -focus_function=f0 2>&1 | FileCheck %s --check-prefix=FOCUS_F0
18+
RUN: %run %t-exe -runs=100 -focus_function=f0 2>&1 | FileCheck %s --check-prefix=FOCUS_F0
1919
FOCUS_F0: INFO: Focus function is set to 'f0'
2020
FOCUS_F0: INFO: 0/1 inputs touch the focus function
2121

@@ -26,6 +26,6 @@ RUN: echo ABC$(for((i=0;i<2048;i++)); do echo -n x; done) > %t-corpus/ABC
2626
RUN: echo AXY$(for((i=0;i<2048;i++)); do echo -n x; done) > %t-corpus/AXY
2727
RUN: echo ABX$(for((i=0;i<2048;i++)); do echo -n x; done) > %t-corpus/ABX
2828

29-
RUN: %t-exe -runs=10000 -focus_function=f0 %t-corpus 2>&1 | FileCheck %s --check-prefix=CORPUS_1_3
29+
RUN: %run %t-exe -runs=10000 -focus_function=f0 %t-corpus 2>&1 | FileCheck %s --check-prefix=CORPUS_1_3
3030
CORPUS_1_3: INFO: 1/3 inputs touch the focus function
3131
CORPUS_1_3: DONE {{.*}} focus:

0 commit comments

Comments
 (0)