aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-testbed/instance.go
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-07-21 11:54:11 +0200
committerTaras Madan <tarasmadan@google.com>2023-07-24 09:12:13 +0000
commit7549a7e1b57831cf6b08ce4700fc6e53417919f9 (patch)
tree8e027cdaf7abbc52a5fb29c37c7137dfd2122e7a /tools/syz-testbed/instance.go
parentf7eecac8b446ef11cff4122de6f496ad5eaba3a9 (diff)
all: use special placeholder for errors
Diffstat (limited to 'tools/syz-testbed/instance.go')
-rw-r--r--tools/syz-testbed/instance.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/syz-testbed/instance.go b/tools/syz-testbed/instance.go
index a7b616eb6..2ea3161e3 100644
--- a/tools/syz-testbed/instance.go
+++ b/tools/syz-testbed/instance.go
@@ -42,7 +42,7 @@ func (inst *InstanceCommon) Run() error {
if inst.LogFile != "" {
logfile, err := os.Create(inst.LogFile)
if err != nil {
- return fmt.Errorf("[%s] failed to create logfile: %s", inst.Name, err)
+ return fmt.Errorf("[%s] failed to create logfile: %w", inst.Name, err)
}
cmd.Stdout = logfile
cmd.Stderr = logfile
@@ -120,7 +120,7 @@ func (inst *SyzManagerInstance) Run() error {
case err := <-ret:
// Syz-managers are not supposed to stop themselves under normal circumstances.
// If one of them did stop, there must have been a very good reason to do so.
- return fmt.Errorf("[%s] stopped: %v", inst.Name, err)
+ return fmt.Errorf("[%s] stopped: %w", inst.Name, err)
case <-time.After(inst.RunTime):
inst.Stop()
<-ret
@@ -153,7 +153,7 @@ func SetupSyzkallerInstance(mgrName, folder string, checkout *Checkout) (*Syzkal
}
err = osutil.WriteFile(cfgFile, managerCfg)
if err != nil {
- return nil, fmt.Errorf("failed to save manager config to %s: %s", cfgFile, err)
+ return nil, fmt.Errorf("failed to save manager config to %s: %w", cfgFile, err)
}
return &SyzkallerInfo{
Workdir: workdir,
@@ -173,7 +173,7 @@ func (t *SyzManagerTarget) newSyzManagerInstance(slotName, uniqName string, chec
corpusPath := filepath.Join(common.Workdir, "corpus.db")
err = osutil.CopyFile(t.config.Corpus, corpusPath)
if err != nil {
- return nil, fmt.Errorf("failed to copy corpus from %s: %s", t.config.Corpus, err)
+ return nil, fmt.Errorf("failed to copy corpus from %s: %w", t.config.Corpus, err)
}
}
return &SyzManagerInstance{