Skip to content

Commit a2a3484

Browse files
committed
test: sync fs before checking for output file
It can happen that we check for the file before `socat` has written it in the filesystem. Sync before checking. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent d28ef60 commit a2a3484

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/integration_tests/functional/test_net.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ def test_tap_offload(uvm_any):
115115
)
116116

117117
# Try to send a UDP message from host with UDP offload enabled
118-
cmd = f"ip netns exec {vm.ssh.netns} python3 ./host_tools/udp_offload.py {vm.ssh.host} {port}"
119-
utils.check_output(cmd)
118+
vm.netns.check_output(f"python3 ./host_tools/udp_offload.py {vm.ssh.host} {port}")
120119

121120
# Check that the server received the message
122-
ret = vm.ssh.run(f"cat {out_filename}")
121+
ret = vm.ssh.run(f"sync ; cat {out_filename}")
123122
assert ret.stdout == message, f"{ret.stdout=} {ret.stderr=}"

0 commit comments

Comments
 (0)