]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests/net: Add SHA256 computation over data sent in tcp_mmap
authorXiaoyan Li <lixiaoyan@google.com>
Tue, 21 Mar 2023 08:12:02 +0000 (16:12 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 22 Mar 2023 14:34:31 +0000 (15:34 +0100)
commit5c5945dc695c54f2b55a934a10b6c4e220f9c140
treed7337bbf616f504bbe4cac78c01b8a96ceb3245c
parent593ef60c74451ba05a87effb50edb5cd45312115
selftests/net: Add SHA256 computation over data sent in tcp_mmap

Add option to compute and send SHA256 over data sent (-i).

This is to ensure the correctness of data received.
Data is randomly populated from /dev/urandom.

Tested:
./tcp_mmap -s -z -i
./tcp_mmap -z -H $ADDR -i
SHA256 is correct

./tcp_mmap -s -i
./tcp_mmap -H $ADDR -i
SHA256 is correct

Signed-off-by: Coco Li <lixiaoyan@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20230321081202.2370275-2-lixiaoyan@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/tcp_mmap.c