Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: ncdevmem: add tx test with multiple IOVs

Use prime 3 for length to make offset slowly drift away.

Signed-off-by: Stanislav Fomichev <stfomichev@gmail.com>
Acked-by: Mina Almasry <almasrymina@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Stanislav Fomichev and committed by
David S. Miller
8ceeef23 61f24c68

+16 -1
+16 -1
tools/testing/selftests/drivers/net/hw/devmem.py
··· 49 49 ksft_eq(socat.stdout.strip(), "hello\nworld") 50 50 51 51 52 + @ksft_disruptive 53 + def check_tx_chunks(cfg) -> None: 54 + cfg.require_ipver("6") 55 + require_devmem(cfg) 56 + 57 + port = rand_port() 58 + listen_cmd = f"socat -U - TCP6-LISTEN:{port}" 59 + 60 + with bkg(listen_cmd, exit_wait=True) as socat: 61 + wait_port_listen(port) 62 + cmd(f"echo -e \"hello\\nworld\"| {cfg.bin_remote} -f {cfg.ifname} -s {cfg.addr_v['6']} -p {port} -z 3", host=cfg.remote, shell=True) 63 + 64 + ksft_eq(socat.stdout.strip(), "hello\nworld") 65 + 66 + 52 67 def main() -> None: 53 68 with NetDrvEpEnv(__file__) as cfg: 54 69 cfg.bin_local = path.abspath(path.dirname(__file__) + "/ncdevmem") 55 70 cfg.bin_remote = cfg.remote.deploy(cfg.bin_local) 56 71 57 - ksft_run([check_rx, check_tx], 72 + ksft_run([check_rx, check_tx, check_tx_chunks], 58 73 args=(cfg, )) 59 74 ksft_exit() 60 75