vpp/extras/hs-test/cpu_pinning_test.go
Hadi Rayan Al-Sandid e0e85134ad hs-test: Add CPU pinning test suite
Type: test

Added suite to verify that VPP launches with provided
CPU pinning configurations. CPU configuration is
specified per-test.

Change-Id: Ic283339676d3b24636fc21156a09a192c1a8d8da
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-07-09 20:14:28 +00:00

31 lines
635 B
Go

package main
import (
. "fd.io/hs-test/infra"
)
func init() {
RegisterCpuPinningSoloTests(DefaultCpuConfigurationTest, SkipCoresTest)
}
// TODO: Add more CPU configuration tests
func DefaultCpuConfigurationTest(s *CpuPinningSuite) {
vpp := s.GetContainerByName(SingleTopoContainerVpp).VppInstance
s.AssertNil(vpp.Start())
}
func SkipCoresTest(s *CpuPinningSuite) {
skipCoresConfiguration := VppCpuConfig{
PinMainCpu: true,
PinWorkersCorelist: true,
SkipCores: 1,
}
vpp := s.GetContainerByName(SingleTopoContainerVpp).VppInstance
vpp.CpuConfig = skipCoresConfiguration
s.AssertNil(vpp.Start())
}