File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -347,13 +347,18 @@ def job(t, args):
347
347
text = True ,
348
348
)
349
349
output += result .stderr
350
- return output , result
350
+ return output , result , t
351
351
352
352
jobs .append (fuzz_pool .submit (job , t , args ))
353
353
354
+ stats = []
354
355
for future in as_completed (jobs ):
355
- output , result = future .result ()
356
+ output , result , target = future .result ()
356
357
logging .debug (output )
358
+ if using_libfuzzer :
359
+ done_stat = [l for l in output .splitlines () if "DONE" in l ]
360
+ assert len (done_stat ) == 1
361
+ stats .append ((target , done_stat [0 ]))
357
362
try :
358
363
result .check_returncode ()
359
364
except subprocess .CalledProcessError as e :
@@ -364,6 +369,13 @@ def job(t, args):
364
369
logging .info (f"Target { result .args } failed with exit code { e .returncode } " )
365
370
sys .exit (1 )
366
371
372
+ if using_libfuzzer :
373
+ print ("Summary:" )
374
+ max_len = max (len (t [0 ]) for t in stats )
375
+ for t , s in sorted (stats ):
376
+ t = t .ljust (max_len + 1 )
377
+ print (f"{ t } { s } " )
378
+
367
379
368
380
def parse_test_list (* , fuzz_bin ):
369
381
test_list_all = subprocess .run (
You can’t perform that action at this time.
0 commit comments