selftests: net: test standard socket cmsgs across UDP and ICMP sockets
authorJakub Kicinski <kuba@kernel.org>
Thu, 10 Feb 2022 00:36:49 +0000 (16:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Feb 2022 15:04:52 +0000 (15:04 +0000)
commitaf6ca20591efce42535e1c870b7ae6eae98df1b3
tree116070949f7ef1e58fb2d6e3176c235c4b57a77e
parenteb8f3116fb3f51062ed8df9db3c4ca730eec3743
selftests: net: test standard socket cmsgs across UDP and ICMP sockets

Test TIMESTAMPING and TXTIME across UDP / ICMP and IP versions.

Before ICMPv6 support:
  # ./tools/testing/selftests/net/cmsg_time.sh
    Case ICMPv6  - ts cnt returned '0', expected '2'
    Case ICMPv6  - ts0 SCHED returned '', expected 'OK'
    Case ICMPv6  - ts0 SND returned '', expected 'OK'
    Case ICMPv6  - TXTIME abs returned '', expected 'OK'
    Case ICMPv6  - TXTIME rel returned '', expected 'OK'
  FAIL - 5/36 cases failed

After:
  # ./tools/testing/selftests/net/cmsg_time.sh
  OK

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/cmsg_time.sh [new file with mode: 0755]