Skip to content

Commit bb6beb9

Browse files
committed
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 <[email protected]>
1 parent ddd6d66 commit bb6beb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/e2e_node/topology_manager_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func detectCoresPerSocket() int {
8383
}
8484

8585
func detectSRIOVDevices() int {
86-
outData, err := exec.Command("/bin/sh", "-c", "ls /sys/bus/pci/devices/*/sriov_totalvfs | wc -w").Output()
86+
outData, err := exec.Command("/bin/sh", "-c", "ls /sys/bus/pci/devices/*/physfn | wc -w").Output()
8787
framework.ExpectNoError(err)
8888

8989
devCount, err := strconv.Atoi(strings.TrimSpace(string(outData)))
@@ -728,7 +728,7 @@ func runTopologyManagerTests(f *framework.Framework) {
728728
e2eskipper.Skipf("this test is meant to run on a system with at least 4 cores per socket")
729729
}
730730
if sriovdevCount == 0 {
731-
e2eskipper.Skipf("this test is meant to run on a system with at least one SRIOV device")
731+
e2eskipper.Skipf("this test is meant to run on a system with at least one configured VF from SRIOV device")
732732
}
733733

734734
configMap := getSRIOVDevicePluginConfigMap(framework.TestContext.SriovdpConfigMapFile)

0 commit comments

Comments
 (0)