summaryrefslogtreecommitdiffstats
path: root/net/mptcp/token.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2020-06-26 19:30:02 +0200
committerDavid S. Miller <davem@davemloft.net>2020-06-26 16:21:39 -0700
commita8ee9c9b58199be2692f7eb761d7a01749f79655 (patch)
tree9b220d6dc36b86b356bdabe65e1e75457a83cceb /net/mptcp/token.c
parenta00a582203dbc43ea311a50e979038fc0c8ee19f (diff)
downloadlinux-stable-a8ee9c9b58199be2692f7eb761d7a01749f79655.tar.gz
linux-stable-a8ee9c9b58199be2692f7eb761d7a01749f79655.tar.bz2
linux-stable-a8ee9c9b58199be2692f7eb761d7a01749f79655.zip
mptcp: introduce token KUNIT self-tests
Unit tests for the internal MPTCP token APIs, using KUNIT v1 -> v2: - use the correct RCU annotation when initializing icsk ulp - fix a few checkpatch issues Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/token.c')
-rw-r--r--net/mptcp/token.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mptcp/token.c b/net/mptcp/token.c
index 9c0771774815..66a4990bd897 100644
--- a/net/mptcp/token.c
+++ b/net/mptcp/token.c
@@ -307,3 +307,12 @@ void __init mptcp_token_init(void)
spin_lock_init(&token_hash[i].lock);
}
}
+
+#if IS_MODULE(CONFIG_MPTCP_KUNIT_TESTS)
+EXPORT_SYMBOL_GPL(mptcp_token_new_request);
+EXPORT_SYMBOL_GPL(mptcp_token_new_connect);
+EXPORT_SYMBOL_GPL(mptcp_token_accept);
+EXPORT_SYMBOL_GPL(mptcp_token_get_sock);
+EXPORT_SYMBOL_GPL(mptcp_token_destroy_request);
+EXPORT_SYMBOL_GPL(mptcp_token_destroy);
+#endif