diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-11-05 17:33:59 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-11-13 10:32:10 +0000 |
| commit | 5ad1a162959d6df7712dc93cffe128322b11d7af (patch) | |
| tree | c9da9e418df1605fff5eb07d6f90a74a9bee4e6b /syz-manager | |
| parent | 8acebd3f596375b3c8c34ee8f9000a344064295a (diff) | |
pkg/repro: accept a cancellable context
Refactor pkg/repro to accept a context.Context object. This will make it
look more similar to other package interfaces and will eventually let us
abort currently running repro jobs without having to shut down the whole
application.
Simplify the code by factoring out the parameters common both to RunSyzRepro()
and RunCRepro().
Diffstat (limited to 'syz-manager')
| -rw-r--r-- | syz-manager/manager.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/syz-manager/manager.go b/syz-manager/manager.go index 07c6df153..7a82a4ee7 100644 --- a/syz-manager/manager.go +++ b/syz-manager/manager.go @@ -430,7 +430,12 @@ func reportReproError(err error) { } func (mgr *Manager) RunRepro(crash *manager.Crash) *manager.ReproResult { - res, stats, err := repro.Run(crash.Output, mgr.cfg, mgr.enabledFeatures, mgr.reporter, mgr.pool) + res, stats, err := repro.Run(context.Background(), crash.Output, repro.Environment{ + Config: mgr.cfg, + Features: mgr.enabledFeatures, + Reporter: mgr.reporter, + Pool: mgr.pool, + }) ret := &manager.ReproResult{ Crash: crash, Repro: res, |
