Hadi Rayan Al-Sandid | e0e8513 | 2024-06-24 10:28:58 +0200 | [diff] [blame^] | 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | . "fd.io/hs-test/infra" |
| 5 | ) |
| 6 | |
| 7 | func init() { |
| 8 | RegisterCpuPinningSoloTests(DefaultCpuConfigurationTest, SkipCoresTest) |
| 9 | } |
| 10 | |
| 11 | // TODO: Add more CPU configuration tests |
| 12 | |
| 13 | func DefaultCpuConfigurationTest(s *CpuPinningSuite) { |
| 14 | vpp := s.GetContainerByName(SingleTopoContainerVpp).VppInstance |
| 15 | s.AssertNil(vpp.Start()) |
| 16 | } |
| 17 | |
| 18 | func SkipCoresTest(s *CpuPinningSuite) { |
| 19 | |
| 20 | skipCoresConfiguration := VppCpuConfig{ |
| 21 | PinMainCpu: true, |
| 22 | PinWorkersCorelist: true, |
| 23 | SkipCores: 1, |
| 24 | } |
| 25 | |
| 26 | vpp := s.GetContainerByName(SingleTopoContainerVpp).VppInstance |
| 27 | vpp.CpuConfig = skipCoresConfiguration |
| 28 | |
| 29 | s.AssertNil(vpp.Start()) |
| 30 | } |