3636from clusterfuzz ._internal .system import environment
3737from clusterfuzz ._internal .system import shell
3838
39+ ENGINE_FUZZER_NAMES = ['afl' , 'centipede' , 'googlefuzztest' , 'libFuzzer' ]
3940MAX_TESTCASE_DIRECTORY_SIZE = 10 * 1024 * 1024 # in bytes.
40- MAX_TESTCASES = 250000
41+ MAX_TESTCASES = 25000
42+ TESTCASES_REPORT_INTERVAL = 2500
4143STORED_TESTCASES_LIST = []
4244
4345# pylint: disable=broad-exception-raised
@@ -51,6 +53,9 @@ def unpack_crash_testcases(crash_testcases_directory):
5153 if count >= MAX_TESTCASES :
5254 logs .info (f'{ MAX_TESTCASES } testcases reached.' )
5355 break
56+ if count % TESTCASES_REPORT_INTERVAL == 0 :
57+ logs .info (f'Processed { count } testcases.' )
58+
5459 testcase_id = testcase .key .id ()
5560
5661 # 1. If we have already stored the testcase, then just skip.
@@ -85,7 +90,7 @@ def unpack_crash_testcases(crash_testcases_directory):
8590
8691 # 8. Skip in-process fuzzer testcases, since these are only applicable to
8792 # fuzz targets and don't run with blackbox binaries.
88- if testcase .fuzzer_name and testcase .fuzzer_name in [ 'afl' , 'libFuzzer' ] :
93+ if testcase .fuzzer_name and testcase .fuzzer_name in ENGINE_FUZZER_NAMES :
8994 continue
9095
9196 # Un-pack testcase.
@@ -108,6 +113,7 @@ def unpack_crash_testcases(crash_testcases_directory):
108113 STORED_TESTCASES_LIST .append (testcase_id )
109114
110115 # Remove testcase directories that exceed the max size limit.
116+ logs .info ('Removing large directories.' )
111117 for directory_name in os .listdir (crash_testcases_directory ):
112118 directory_path = os .path .join (crash_testcases_directory , directory_name )
113119 if not os .path .isdir (directory_path ):
@@ -119,6 +125,7 @@ def unpack_crash_testcases(crash_testcases_directory):
119125 shell .remove_directory (directory_path )
120126
121127 # Rename all fuzzed testcase files as regular files.
128+ logs .info ('Renaming testcase files.' )
122129 for root , _ , files in os .walk (crash_testcases_directory ):
123130 for filename in files :
124131 if not filename .startswith (testcase_manager .FUZZ_PREFIX ):
0 commit comments