selftests/net/ipsec: Add test for xfrm_spdattr_type_t
authorDmitry Safonov <dima@arista.com>
Sat, 17 Jul 2021 15:02:22 +0000 (16:02 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 21 Jul 2021 07:53:25 +0000 (09:53 +0200)
commit70bfdf62e93a4d73cfbaf83a3ac708a483ef7a71
tree9d677a6468a38607789c2356d8351449262118b6
parent4e9505064f58d1252805952f8547a5b7dbc5c111
selftests/net/ipsec: Add test for xfrm_spdattr_type_t

Set hthresh, dump it again and verify thresh.lbits && thresh.rbits.
They are passed as attributes of xfrm_spdattr_type_t, different from
other message attributes that use xfrm_attr_type_t.
Also, test attribute that is bigger than XFRMA_SPD_MAX, currently it
should be silently ignored.

Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
tools/testing/selftests/net/ipsec.c