diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-01-15 12:23:34 -0500 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-02-20 09:20:46 -0500 |
commit | eebd8c2d1978f5cb6e76e4e3045220b67548cb79 (patch) | |
tree | fc9e282885de3c30d9517ce0e0ccb1d855f5d7b4 /net/sunrpc/Kconfig | |
parent | 6e460c230d2dfb0e5a02b6e0995546bb4b9d208e (diff) | |
download | linux-eebd8c2d1978f5cb6e76e4e3045220b67548cb79.tar.gz linux-eebd8c2d1978f5cb6e76e4e3045220b67548cb79.tar.bz2 linux-eebd8c2d1978f5cb6e76e4e3045220b67548cb79.zip |
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>
Diffstat (limited to 'net/sunrpc/Kconfig')
-rw-r--r-- | net/sunrpc/Kconfig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/sunrpc/Kconfig b/net/sunrpc/Kconfig index b8e1819a8dd0..4afc5fd71d44 100644 --- a/net/sunrpc/Kconfig +++ b/net/sunrpc/Kconfig @@ -107,6 +107,21 @@ config RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2 SHA-2 digests. These include aes128-cts-hmac-sha256-128 and aes256-cts-hmac-sha384-192. +config RPCSEC_GSS_KRB5_KUNIT_TEST + tristate "KUnit tests for RPCSEC GSS Kerberos" if !KUNIT_ALL_TESTS + depends on RPCSEC_GSS_KRB5 && KUNIT + default KUNIT_ALL_TESTS + help + This builds the KUnit tests for RPCSEC GSS Kerberos 5. + + KUnit tests run during boot and output the results to the debug + log in TAP format (https://testanything.org/). Only useful for + kernel devs running KUnit test harness and are not for inclusion + into a production build. + + For more information on KUnit and unit tests in general, refer + to the KUnit documentation in Documentation/dev-tools/kunit/. + config SUNRPC_DEBUG bool "RPC: Enable dprintk debugging" depends on SUNRPC && SYSCTL |