|
13 | 13 |
|
14 | 14 | from lib.py import ksft_run, ksft_exit, ksft_eq, ksft_ne, ksft_pr
|
15 | 15 | from lib.py import KsftFailEx, NetDrvEpEnv, EthtoolFamily, NlError
|
16 |
| -from lib.py import bkg, cmd, rand_port |
| 16 | +from lib.py import bkg, cmd, rand_port, wait_port_listen |
17 | 17 | from lib.py import ip, bpftool, defer
|
18 | 18 |
|
19 | 19 |
|
@@ -70,6 +70,7 @@ def _exchg_udp(cfg, port, test_string):
|
70 | 70 | tx_udp_cmd = f"echo -n {test_string} | socat -t 2 -u STDIN UDP:{cfg.baddr}:{port}"
|
71 | 71 |
|
72 | 72 | with bkg(rx_udp_cmd, exit_wait=True) as nc:
|
| 73 | + wait_port_listen(port, proto="udp") |
73 | 74 | cmd(tx_udp_cmd, host=cfg.remote, shell=True)
|
74 | 75 |
|
75 | 76 | return nc.stdout.strip()
|
@@ -310,6 +311,7 @@ def test_xdp_native_tx_mb(cfg):
|
310 | 311 | tx_udp = f"echo {test_string} | socat -t 2 -u STDIN UDP:{cfg.baddr}:{port}"
|
311 | 312 |
|
312 | 313 | with bkg(rx_udp, host=cfg.remote, exit_wait=True) as rnc:
|
| 314 | + wait_port_listen(port, proto="udp", host=cfg.remote) |
313 | 315 | cmd(tx_udp, host=cfg.remote, shell=True)
|
314 | 316 |
|
315 | 317 | stats = _get_stats(prog_info['maps']['map_xdp_stats'])
|
|
0 commit comments