aboutsummaryrefslogtreecommitdiffstats
path: root/net/handshake/request.c
diff options
context:
space:
mode:
authorChuck Lever <[email protected]>2023-04-17 14:32:39 +0000
committerJakub Kicinski <[email protected]>2023-04-20 01:48:48 +0000
commit88232ec1ec5ecf4aa5de439cff3d5e2b7adcac93 (patch)
tree3b7255875d4f657e0cf0e3087ecab918f3d01ba3 /net/handshake/request.c
parentnet/handshake: Add a kernel API for requesting a TLSv1.3 handshake (diff)
downloadkernel-88232ec1ec5ecf4aa5de439cff3d5e2b7adcac93.tar.gz
kernel-88232ec1ec5ecf4aa5de439cff3d5e2b7adcac93.zip
net/handshake: Add Kunit tests for the handshake consumer API
These verify the API contracts and help exercise lifetime rules for consumer sockets and handshake_req structures. One way to run these tests: ./tools/testing/kunit/kunit.py run --kunitconfig ./net/handshake/.kunitconfig Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/handshake/request.c')
-rw-r--r--net/handshake/request.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/handshake/request.c b/net/handshake/request.c
index d5b2bc6de057..94d5cef3e048 100644
--- a/net/handshake/request.c
+++ b/net/handshake/request.c
@@ -20,6 +20,8 @@
#include <net/genetlink.h>
#include <net/netns/generic.h>
+#include <kunit/visibility.h>
+
#include <uapi/linux/handshake.h>
#include "handshake.h"
@@ -60,6 +62,7 @@ struct handshake_req *handshake_req_hash_lookup(struct sock *sk)
return rhashtable_lookup_fast(&handshake_rhashtbl, &sk,
handshake_rhash_params);
}
+EXPORT_SYMBOL_IF_KUNIT(handshake_req_hash_lookup);
static bool handshake_req_hash_add(struct handshake_req *req)
{
@@ -192,6 +195,7 @@ struct handshake_req *handshake_req_next(struct handshake_net *hn, int class)
return req;
}
+EXPORT_SYMBOL_IF_KUNIT(handshake_req_next);
/**
* handshake_req_submit - Submit a handshake request
@@ -293,6 +297,7 @@ void handshake_complete(struct handshake_req *req, unsigned int status,
sock_put(sk);
}
}
+EXPORT_SYMBOL_IF_KUNIT(handshake_complete);
/**
* handshake_req_cancel - Cancel an in-progress handshake