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 260d7eb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 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,14 @@ 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
// Adding a retry because some of the time we get `Dump was interrupted and may be inconsistent.`
// output from the ip link command
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 260d7eb

Please sign in to comment.