File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,12 @@ def smallest_input(self):
8686 def get_edges_from_input (self , data ):
8787 tracer = Tracer ()
8888 tracer .start ()
89- crashed = False
89+ crashed = None
9090 try :
9191 self .target (data )
9292 except Exception as exc :
9393 # TODO: when shrinking check exception matches?
94- crashed = True
94+ crashed = exc
9595 self .write_crash_to_disk (data )
9696 raise exc
9797 tracer .stop ()
@@ -264,8 +264,12 @@ def fuzz(self):
264264 self .print_pulse (num_execs , start )
265265 num_execs += 1
266266
267- def minimize (self , path ):
268- self .import_testcase (path )
267+ def minimize (self , data ):
268+ # TODO: minimize using a few simple strategies
269+ edges , crashed = self .get_edges_from_input (data )
270+ # TODO: if it crashed, minimize while maintaining same
271+ # exception type. otherwise, maintain edge coverage
272+ # TODO: pipe tests through here before writing to disk
269273
270274
271275if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments