e0e85134ad
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>
31 lines
635 B
Go
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())
|
|
}
|