aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/cpu_pinning_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/cpu_pinning_test.go')
-rw-r--r--extras/hs-test/cpu_pinning_test.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/extras/hs-test/cpu_pinning_test.go b/extras/hs-test/cpu_pinning_test.go
new file mode 100644
index 00000000000..b8dec65937e
--- /dev/null
+++ b/extras/hs-test/cpu_pinning_test.go
@@ -0,0 +1,30 @@
+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())
+}