linux/net/handshake/handshake-test.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2023 Oracle and/or its affiliates.
 *
 * KUnit test of the handshake upcall mechanism.
 */

#include <kunit/test.h>
#include <kunit/visibility.h>

#include <linux/kernel.h>

#include <net/sock.h>
#include <net/genetlink.h>
#include <net/netns/generic.h>

#include <uapi/linux/handshake.h>
#include "handshake.h"

MODULE_IMPORT_NS();

static int test_accept_func(struct handshake_req *req, struct genl_info *info,
			    int fd)
{}

static void test_done_func(struct handshake_req *req, unsigned int status,
			   struct genl_info *info)
{}

struct handshake_req_alloc_test_param {};

static struct handshake_proto handshake_req_alloc_proto_2 =;

static struct handshake_proto handshake_req_alloc_proto_3 =;

static struct handshake_proto handshake_req_alloc_proto_4 =;

static struct handshake_proto handshake_req_alloc_proto_5 =;

static struct handshake_proto handshake_req_alloc_proto_6 =;

static struct handshake_proto handshake_req_alloc_proto_good =;

static const
struct handshake_req_alloc_test_param handshake_req_alloc_params[] =;

static void
handshake_req_alloc_get_desc(const struct handshake_req_alloc_test_param *param,
			     char *desc)
{}

/* Creates the function handshake_req_alloc_gen_params */
KUNIT_ARRAY_PARAM(handshake_req_alloc, handshake_req_alloc_params,
		  handshake_req_alloc_get_desc);

static void handshake_req_alloc_case(struct kunit *test)
{}

static void handshake_req_submit_test1(struct kunit *test)
{}

static void handshake_req_submit_test2(struct kunit *test)
{}

static void handshake_req_submit_test3(struct kunit *test)
{}

static void handshake_req_submit_test4(struct kunit *test)
{}

static void handshake_req_submit_test5(struct kunit *test)
{}

static void handshake_req_submit_test6(struct kunit *test)
{}

static void handshake_req_cancel_test1(struct kunit *test)
{}

static void handshake_req_cancel_test2(struct kunit *test)
{}

static void handshake_req_cancel_test3(struct kunit *test)
{}

static struct handshake_req *handshake_req_destroy_test;

static void test_destroy_func(struct handshake_req *req)
{}

static struct handshake_proto handshake_req_alloc_proto_destroy =;

static void handshake_req_destroy_test1(struct kunit *test)
{}

static struct kunit_case handshake_api_test_cases[] =;

static struct kunit_suite handshake_api_suite =;

kunit_test_suites();

MODULE_DESCRIPTION();
MODULE_LICENSE();