Skip to content

Commit

Permalink
functest: Fix ip link command output
Browse files Browse the repository at this point in the history
This will fix the issue we sometime see ` <string>: Dump was interrupted and may be
inconsistent.\n`

https://docs.kernel.org/userspace-api/netlink/intro.html#dump-consistency

Signed-off-by: Sebastian Sch <[email protected]>
  • Loading branch information
SchSeba committed Dec 24, 2024
1 parent eb2fa5f commit cd7a8d6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/conformance/tests/test_sriov_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,12 @@ var _ = Describe("[sriov] operator", func() {
Expect(err).ToNot(HaveOccurred())

Eventually(func() bool {
stdout, stderr, err := pod.ExecCommand(clients, hostNetPod, "ip", "link", "show")
Expect(err).ToNot(HaveOccurred())
Expect(stderr).To(Equal(""))
var stdout, stderr string
Eventually(func(g Gomega) {
stdout, stderr, err = pod.ExecCommand(clients, hostNetPod, "ip", "link", "show")
g.Expect(err).ToNot(HaveOccurred())
g.Expect(stderr).To(Equal(""))
}, time.Minute, 2*time.Second).Should(Succeed())

found := false
for _, line := range strings.Split(stdout, "\n") {
Expand Down

0 comments on commit cd7a8d6

Please sign in to comment.