aboutsummaryrefslogtreecommitdiffstats
path: root/syz-ci/manager.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-05-22 09:32:53 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-05-22 08:43:11 +0000
commit4d098039e09f95a4767fe001c5fd244e6eaeef28 (patch)
tree47eb209d81c978f5b4d3b82c120d6be572150f37 /syz-ci/manager.go
parent6d22fe32b1dab5eb3ed693cfdcc0a63ccd886e96 (diff)
syz-ci: use unique ports for test instances
Currently they can collide with the main instance and fail. Use unique ports for test instances.
Diffstat (limited to 'syz-ci/manager.go')
-rw-r--r--syz-ci/manager.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/syz-ci/manager.go b/syz-ci/manager.go
index 65b5385ef..2f4e872f8 100644
--- a/syz-ci/manager.go
+++ b/syz-ci/manager.go
@@ -549,6 +549,9 @@ func (mgr *Manager) createTestConfig(imageDir string, info *BuildInfo) (*mgrconf
*mgrcfg = *mgr.managercfg
mgrcfg.Name += "-test"
mgrcfg.Tag = info.KernelCommit
+ // Use random free ports to not collide with the actual manager.
+ mgrcfg.HTTP = fmt.Sprintf("localhost:%v", mgr.mgrcfg.testHTTPPort)
+ mgrcfg.RPC = fmt.Sprintf("localhost:%v", mgr.mgrcfg.testRPCPort)
mgrcfg.Workdir = filepath.Join(imageDir, "workdir")
if err := instance.SetConfigImage(mgrcfg, imageDir, true); err != nil {
return nil, err