From bb6beb99e5ab7182cd02f64b26fdf9d69f255297 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Fri, 14 Feb 2020 18:07:05 +0100 Subject: [PATCH] e2e: topomgr: early check to detect VFs, not PFs The e2e_node topology_manager check have a early, quick check to rule out systems without sriov device, thus skipping the tests. The first version of the ckeck detected PFs, (Physical Functions), under the assumption that VFs (Virtual Functions) were already been created. This works because, obviously, you can't have VFs without PFs. However, it's a little safer and easier to understand if we check firectly for VFs, bailing out from systems which don't provide them. Nothing changes for properly configured test systems. Signed-off-by: Francesco Romani --- test/e2e_node/topology_manager_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e_node/topology_manager_test.go b/test/e2e_node/topology_manager_test.go index 51cf16b4bde..ce025d03c12 100644 --- a/test/e2e_node/topology_manager_test.go +++ b/test/e2e_node/topology_manager_test.go @@ -83,7 +83,7 @@ func detectCoresPerSocket() int { } func detectSRIOVDevices() int { - outData, err := exec.Command("/bin/sh", "-c", "ls /sys/bus/pci/devices/*/sriov_totalvfs | wc -w").Output() + outData, err := exec.Command("/bin/sh", "-c", "ls /sys/bus/pci/devices/*/physfn | wc -w").Output() framework.ExpectNoError(err) devCount, err := strconv.Atoi(strings.TrimSpace(string(outData))) @@ -728,7 +728,7 @@ func runTopologyManagerTests(f *framework.Framework) { e2eskipper.Skipf("this test is meant to run on a system with at least 4 cores per socket") } if sriovdevCount == 0 { - e2eskipper.Skipf("this test is meant to run on a system with at least one SRIOV device") + e2eskipper.Skipf("this test is meant to run on a system with at least one configured VF from SRIOV device") } configMap := getSRIOVDevicePluginConfigMap(framework.TestContext.SriovdpConfigMapFile)