blob: b8dec65937ebde2e2d4d53718d4142ff6eb86585 [file] [log] [blame]
Hadi Rayan Al-Sandide0e85132024-06-24 10:28:58 +02001package main
2
3import (
4 . "fd.io/hs-test/infra"
5)
6
7func init() {
8 RegisterCpuPinningSoloTests(DefaultCpuConfigurationTest, SkipCoresTest)
9}
10
11// TODO: Add more CPU configuration tests
12
13func DefaultCpuConfigurationTest(s *CpuPinningSuite) {
14 vpp := s.GetContainerByName(SingleTopoContainerVpp).VppInstance
15 s.AssertNil(vpp.Start())
16}
17
18func 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}