aboutsummaryrefslogtreecommitdiffstats
path: root/syz-ci
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-09-10 12:43:37 +0200
committerDmitry Vyukov <dvyukov@google.com>2022-09-13 09:09:09 +0200
commit888b8065ee1ed8d54b5e69b7b463cac176de188f (patch)
tree7d1ad69095d95318be981b73c3bc476a8a628c0d /syz-ci
parentf371ed7e86e6a6b1b16a5700cd57055944574563 (diff)
syz-ci: simplify code
Don't copy syzkaller files from one map to another. Probably a leftover from the times we used a temp slice or something.
Diffstat (limited to 'syz-ci')
-rw-r--r--syz-ci/updater.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/syz-ci/updater.go b/syz-ci/updater.go
index e9ba2c004..37519f45a 100644
--- a/syz-ci/updater.go
+++ b/syz-ci/updater.go
@@ -69,7 +69,7 @@ func NewSyzUpdater(cfg *Config) *SyzUpdater {
osutil.MkdirAll(syzkallerDir)
// List of required files in syzkaller build (contents of latest/current dirs).
- files := map[string]bool{
+ syzFiles := map[string]bool{
"tag": true, // contains syzkaller repo git hash
"bin/syz-ci": true, // these are just copied from syzkaller dir
"bin/syz-manager": true,
@@ -80,16 +80,12 @@ func NewSyzUpdater(cfg *Config) *SyzUpdater {
mgrcfg := mgr.managercfg
os, vmarch, arch := mgrcfg.TargetOS, mgrcfg.TargetVMArch, mgrcfg.TargetArch
targets[os+"/"+vmarch+"/"+arch] = true
- files[fmt.Sprintf("bin/%v_%v/syz-fuzzer", os, vmarch)] = true
- files[fmt.Sprintf("bin/%v_%v/syz-execprog", os, vmarch)] = true
+ syzFiles[fmt.Sprintf("bin/%v_%v/syz-fuzzer", os, vmarch)] = true
+ syzFiles[fmt.Sprintf("bin/%v_%v/syz-execprog", os, vmarch)] = true
if mgrcfg.SysTarget.ExecutorBin == "" {
- files[fmt.Sprintf("bin/%v_%v/syz-executor", os, arch)] = true
+ syzFiles[fmt.Sprintf("bin/%v_%v/syz-executor", os, arch)] = true
}
}
- syzFiles := make(map[string]bool)
- for f := range files {
- syzFiles[f] = true
- }
compilerID, err := osutil.RunCmd(time.Minute, "", "go", "version")
if err != nil {
log.Fatalf("%v", err)