Skip to content

Commit

Permalink
e2e: Improve findUnusedSriovDevices errors
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Panattoni <[email protected]>
  • Loading branch information
zeeke committed Dec 5, 2024
1 parent 093893c commit df2a973
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/conformance/tests/test_sriov_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1846,9 +1846,17 @@ func findUnusedSriovDevices(testNode string, sriovDevices []*sriovv1.InterfaceEx
if isDefaultRouteInterface(device.Name, routes) {
continue
}
stdout, _, err = pod.ExecCommand(clients, createdPod, "ip", "link", "show", device.Name)
Expect(err).ToNot(HaveOccurred())
Expect(len(stdout)).Should(Not(Equal(0)), "Unable to query link state")
stdout, stderr, err := pod.ExecCommand(clients, createdPod, "ip", "link", "show", device.Name)
if err != nil {
fmt.Printf("Can't query link state for device [%s]: %s", device.Name, err.Error())
continue
}

if len(stdout) == 0 {
fmt.Printf("Can't query link state for device [%s]: stderr:[%s]", device.Name, stderr)
continue
}

if strings.Contains(stdout, "master ovs-system") {
continue // The interface is not active
}
Expand Down

0 comments on commit df2a973

Please sign in to comment.