diff --git a/pkg/osutil/osutil.go b/pkg/osutil/osutil.go index 340c51de..cd6a1cce 100644 --- a/pkg/osutil/osutil.go +++ b/pkg/osutil/osutil.go @@ -235,21 +235,6 @@ func LinkFiles(srcDir, dstDir string, files map[string]bool) error { return nil } -// LinkDir creates soft links from dstDir to srcDir. -// All other files in dstDir are removed. -func LinkDir(srcDir, dstDir string) error { - if err := os.RemoveAll(dstDir); err != nil { - return err - } - if err := MkdirAll(dstDir); err != nil { - return err - } - if err := os.Symlink(srcDir, dstDir); err != nil { - return err - } - return nil -} - func MkdirAll(dir string) error { return os.MkdirAll(dir, DefaultDirPerm) } diff --git a/syz-ci/manager.go b/syz-ci/manager.go index f5885787..99a2ec44 100644 --- a/syz-ci/manager.go +++ b/syz-ci/manager.go @@ -79,7 +79,7 @@ type Manager struct { stop chan struct{} } -func createManager(cfg *Config, mgrcfg *ManagerConfig, stop chan struct{}, syzLinuxTestDir string) (*Manager, error) { +func createManager(cfg *Config, mgrcfg *ManagerConfig, stop chan struct{}) (*Manager, error) { dir := osutil.Abs(filepath.Join("managers", mgrcfg.Name)) if err := osutil.MkdirAll(dir); err != nil { log.Fatal(err) @@ -127,11 +127,6 @@ func createManager(cfg *Config, mgrcfg *ManagerConfig, stop chan struct{}, syzLi stop: stop, } - // Copy test files into the current manager workdir. - if err := osutil.LinkDir(syzLinuxTestDir, filepath.Join(dir, "workdir", "seeds")); err != nil { - log.Fatal(err) - } - os.RemoveAll(mgr.currentDir) return mgr, nil } diff --git a/syz-ci/syz-ci.go b/syz-ci/syz-ci.go index 7b401937..faa51f4f 100644 --- a/syz-ci/syz-ci.go +++ b/syz-ci/syz-ci.go @@ -170,10 +170,9 @@ func main() { wg.Done() }() - syzLinuxTestDir := filepath.Join(updater.syzkallerDir, "sys", "linux", "test") var managers []*Manager for _, mgrcfg := range cfg.Managers { - mgr, err := createManager(cfg, mgrcfg, stop, syzLinuxTestDir) + mgr, err := createManager(cfg, mgrcfg, stop) if err != nil { log.Logf(0, "failed to create manager %v: %v", mgrcfg.Name, err) continue diff --git a/syz-ci/updater.go b/syz-ci/updater.go index 7ffe33ef..dd89f8d5 100644 --- a/syz-ci/updater.go +++ b/syz-ci/updater.go @@ -72,6 +72,7 @@ func NewSyzUpdater(cfg *Config) *SyzUpdater { "tag": true, // contains syzkaller repo git hash "bin/syz-ci": true, // these are just copied from syzkaller dir "bin/syz-manager": true, + "sys/*/test/*": true, } targets := make(map[string]bool) for _, mgr := range cfg.Managers {