Skip to content

Commit 27a2c2f

Browse files
committed
tools/syz-aflow: only print errors once at the end
Currently, when an error occurs, it is printed as part of many Spans, in my experience 3 times: 2026/01/20 19:38:59 finished action crash-reproducer (1/4) in 1.570202281s results: CrashReport: error: reproducer did not crash 2026/01/20 19:38:59 finished flow patching (0/0) in 1.571440624s results: error: reproducer did not crash reproducer did not crash exit status 1 After this change it is only printed once: 2026/01/20 19:36:42 starting action crash-reproducer (1/4)... reproducer did not crash exit status 1
1 parent 3dc0de9 commit 27a2c2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/syz-aflow/aflow.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ func run(ctx context.Context, model, flowName, inputFile, workdir string, cacheS
9898
}
9999

100100
func onEvent(span *trajectory.Span) error {
101+
if span.Error != "" {
102+
// We do not want to print error twice (once here and once in main).
103+
// So we ignore those events.
104+
return nil
105+
}
101106
log.Printf("%v", span)
102107
return nil
103108
}

0 commit comments

Comments
 (0)