linux/net/core/net_test.c

// SPDX-License-Identifier: GPL-2.0-or-later

#include <kunit/test.h>

/* GSO */

#include <linux/skbuff.h>

static const char hdr[] =;
#define GSO_TEST_SIZE

static void __init_skb(struct sk_buff *skb)
{}

enum gso_test_nr {};

struct gso_test_case {};

static struct gso_test_case cases[] =;

static void gso_test_case_to_desc(struct gso_test_case *t, char *desc)
{}

KUNIT_ARRAY_PARAM(gso_test, cases, gso_test_case_to_desc);

static void gso_test_func(struct kunit *test)
{}

/* IP tunnel flags */

#include <net/ip_tunnels.h>

struct ip_tunnel_flags_test {};

#define IP_TUNNEL_FLAGS_TEST(n, src, comp, eval, exp)

/* These are __be16-compatible and can be compared as is */
static const u16 ip_tunnel_flags_1[] =;

/* Due to the previous flags design limitation, setting either
 * ``IP_TUNNEL_CSUM_BIT`` (on Big Endian) or ``IP_TUNNEL_DONT_FRAGMENT_BIT``
 * (on Little) also sets VTI/ISATAP bit. In the bitmap implementation, they
 * correspond to ``BIT(16)``, which is bigger than ``U16_MAX``, but still is
 * backward-compatible.
 */
#ifdef __LITTLE_ENDIAN
#define IP_TUNNEL_CONFLICT_BIT
#else
#define IP_TUNNEL_CONFLICT_BIT
#endif

static const u16 ip_tunnel_flags_2_src[] =;

static const u16 ip_tunnel_flags_2_exp[] =;

/* Bits 17 and higher are not compatible with __be16 flags */
static const u16 ip_tunnel_flags_3_src[] =;

static const u16 ip_tunnel_flags_3_exp[] =;

static const struct ip_tunnel_flags_test ip_tunnel_flags_test[] =;

static void
ip_tunnel_flags_test_case_to_desc(const struct ip_tunnel_flags_test *t,
				  char *desc)
{}
KUNIT_ARRAY_PARAM(ip_tunnel_flags_test, ip_tunnel_flags_test,
		  ip_tunnel_flags_test_case_to_desc);

static void ip_tunnel_flags_test_run(struct kunit *test)
{}

static struct kunit_case net_test_cases[] =;

static struct kunit_suite net_test_suite =;
kunit_test_suite();

MODULE_DESCRIPTION();
MODULE_LICENSE();