From b9464cde7d3288f8feeeaf945ce933b276f07d82 Mon Sep 17 00:00:00 2001 From: Adrian Villin Date: Mon, 27 May 2024 09:52:59 -0400 Subject: hs-test: pin CPUs to containers Type: test Change-Id: I412be2dec7ff352740e50e838e0ac466bf0a6674 Signed-off-by: Adrian Villin --- extras/hs-test/hst_suite.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'extras/hs-test/hst_suite.go') diff --git a/extras/hs-test/hst_suite.go b/extras/hs-test/hst_suite.go index 9cb79c563fa..b8c0a424d58 100644 --- a/extras/hs-test/hst_suite.go +++ b/extras/hs-test/hst_suite.go @@ -30,19 +30,19 @@ var nConfiguredCpus = flag.Int("cpus", 1, "number of CPUs assigned to vpp") var vppSourceFileDir = flag.String("vppsrc", "", "vpp source file directory") type HstSuite struct { - containers map[string]*Container - vppContainerCount int - volumes []string - netConfigs []NetConfig - netInterfaces map[string]*NetInterface - ip4AddrAllocator *Ip4AddressAllocator - testIds map[string]string - cpuAllocator *CpuAllocatorT - cpuContexts []*CpuContext - cpuPerVpp int - pid string - logger *log.Logger - logFile *os.File + containers map[string]*Container + containerCount int + volumes []string + netConfigs []NetConfig + netInterfaces map[string]*NetInterface + ip4AddrAllocator *Ip4AddressAllocator + testIds map[string]string + cpuAllocator *CpuAllocatorT + cpuContexts []*CpuContext + cpuPerVpp int + pid string + logger *log.Logger + logFile *os.File } func (s *HstSuite) SetupSuite() { @@ -62,7 +62,7 @@ func (s *HstSuite) SetupSuite() { } func (s *HstSuite) AllocateCpus() []int { - cpuCtx, err := s.cpuAllocator.Allocate(s.vppContainerCount, s.cpuPerVpp) + cpuCtx, err := s.cpuAllocator.Allocate(s.containerCount, s.cpuPerVpp) s.assertNil(err) s.AddCpuContext(cpuCtx) return cpuCtx.cpus @@ -96,7 +96,7 @@ func (s *HstSuite) skipIfUnconfiguring() { func (s *HstSuite) SetupTest() { s.log("Test Setup") - s.vppContainerCount = 0 + s.containerCount = 0 s.skipIfUnconfiguring() s.setupVolumes() s.setupContainers() -- cgit 1.2.3-korg