SUNRPC: Add KUnit tests for rpcsec_krb5.ko
authorChuck Lever <chuck.lever@oracle.com>
Sun, 15 Jan 2023 17:23:34 +0000 (12:23 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 20 Feb 2023 14:20:46 +0000 (09:20 -0500)
commiteebd8c2d1978f5cb6e76e4e3045220b67548cb79
treefc9e282885de3c30d9517ce0e0ccb1d855f5d7b4
parent6e460c230d2dfb0e5a02b6e0995546bb4b9d208e
SUNRPC: Add KUnit tests for rpcsec_krb5.ko

The Kerberos RFCs provide test vectors to verify the operation of
an implementation. Introduce a KUnit test framework to exercise the
Linux kernel's implementation of Kerberos.

Start with test cases for the RFC 3961-defined n-fold function. The
sample vectors for that are found in RFC 3961 Section 10.

Run the GSS Kerberos 5 mechanism's unit tests with this command:

$ ./tools/testing/kunit/kunit.py run \
--kunitconfig ./net/sunrpc/.kunitconfig

Tested-by: Scott Mayhew <smayhew@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/.kunitconfig [new file with mode: 0644]
net/sunrpc/Kconfig
net/sunrpc/auth_gss/Makefile
net/sunrpc/auth_gss/gss_krb5_internal.h
net/sunrpc/auth_gss/gss_krb5_keys.c
net/sunrpc/auth_gss/gss_krb5_test.c [new file with mode: 0644]