#include <kunit/test.h>
#include <linux/idr.h>
#include "tb.h"
#include "tunnel.h"
static int __ida_init(struct kunit_resource *res, void *context)
{ … }
static void __ida_destroy(struct kunit_resource *res)
{ … }
static void kunit_ida_init(struct kunit *test, struct ida *ida)
{ … }
static struct tb_switch *alloc_switch(struct kunit *test, u64 route,
u8 upstream_port, u8 max_port_number)
{ … }
static struct tb_switch *alloc_host(struct kunit *test)
{ … }
static struct tb_switch *alloc_host_usb4(struct kunit *test)
{ … }
static struct tb_switch *alloc_host_br(struct kunit *test)
{ … }
static struct tb_switch *alloc_dev_default(struct kunit *test,
struct tb_switch *parent,
u64 route, bool bonded)
{ … }
static struct tb_switch *alloc_dev_with_dpin(struct kunit *test,
struct tb_switch *parent,
u64 route, bool bonded)
{ … }
static struct tb_switch *alloc_dev_without_dp(struct kunit *test,
struct tb_switch *parent,
u64 route, bool bonded)
{ … }
static struct tb_switch *alloc_dev_usb4(struct kunit *test,
struct tb_switch *parent,
u64 route, bool bonded)
{ … }
static void tb_test_path_basic(struct kunit *test)
{ … }
static void tb_test_path_not_connected_walk(struct kunit *test)
{ … }
struct port_expectation { … };
static void tb_test_path_single_hop_walk(struct kunit *test)
{ … }
static void tb_test_path_daisy_chain_walk(struct kunit *test)
{ … }
static void tb_test_path_simple_tree_walk(struct kunit *test)
{ … }
static void tb_test_path_complex_tree_walk(struct kunit *test)
{ … }
static void tb_test_path_max_length_walk(struct kunit *test)
{ … }
static void tb_test_path_not_connected(struct kunit *test)
{ … }
struct hop_expectation { … };
static void tb_test_path_not_bonded_lane0(struct kunit *test)
{ … }
static void tb_test_path_not_bonded_lane1(struct kunit *test)
{ … }
static void tb_test_path_not_bonded_lane1_chain(struct kunit *test)
{ … }
static void tb_test_path_not_bonded_lane1_chain_reverse(struct kunit *test)
{ … }
static void tb_test_path_mixed_chain(struct kunit *test)
{ … }
static void tb_test_path_mixed_chain_reverse(struct kunit *test)
{ … }
static void tb_test_tunnel_pcie(struct kunit *test)
{ … }
static void tb_test_tunnel_dp(struct kunit *test)
{ … }
static void tb_test_tunnel_dp_chain(struct kunit *test)
{ … }
static void tb_test_tunnel_dp_tree(struct kunit *test)
{ … }
static void tb_test_tunnel_dp_max_length(struct kunit *test)
{ … }
static void tb_test_tunnel_3dp(struct kunit *test)
{ … }
static void tb_test_tunnel_usb3(struct kunit *test)
{ … }
static void tb_test_tunnel_port_on_path(struct kunit *test)
{ … }
static void tb_test_tunnel_dma(struct kunit *test)
{ … }
static void tb_test_tunnel_dma_rx(struct kunit *test)
{ … }
static void tb_test_tunnel_dma_tx(struct kunit *test)
{ … }
static void tb_test_tunnel_dma_chain(struct kunit *test)
{ … }
static void tb_test_tunnel_dma_match(struct kunit *test)
{ … }
static void tb_test_credit_alloc_legacy_not_bonded(struct kunit *test)
{ … }
static void tb_test_credit_alloc_legacy_bonded(struct kunit *test)
{ … }
static void tb_test_credit_alloc_pcie(struct kunit *test)
{ … }
static void tb_test_credit_alloc_without_dp(struct kunit *test)
{ … }
static void tb_test_credit_alloc_dp(struct kunit *test)
{ … }
static void tb_test_credit_alloc_usb3(struct kunit *test)
{ … }
static void tb_test_credit_alloc_dma(struct kunit *test)
{ … }
static void tb_test_credit_alloc_dma_multiple(struct kunit *test)
{ … }
static struct tb_tunnel *TB_TEST_PCIE_TUNNEL(struct kunit *test,
struct tb_switch *host, struct tb_switch *dev)
{ … }
static struct tb_tunnel *TB_TEST_DP_TUNNEL1(struct kunit *test,
struct tb_switch *host, struct tb_switch *dev)
{ … }
static struct tb_tunnel *TB_TEST_DP_TUNNEL2(struct kunit *test,
struct tb_switch *host, struct tb_switch *dev)
{ … }
static struct tb_tunnel *TB_TEST_USB3_TUNNEL(struct kunit *test,
struct tb_switch *host, struct tb_switch *dev)
{ … }
static struct tb_tunnel *TB_TEST_DMA_TUNNEL1(struct kunit *test,
struct tb_switch *host, struct tb_switch *dev)
{ … }
static struct tb_tunnel *TB_TEST_DMA_TUNNEL2(struct kunit *test,
struct tb_switch *host, struct tb_switch *dev)
{ … }
static void tb_test_credit_alloc_all(struct kunit *test)
{ … }
static const u32 root_directory[] = …;
static const uuid_t network_dir_uuid = …;
static void tb_test_property_parse(struct kunit *test)
{ … }
static void tb_test_property_format(struct kunit *test)
{ … }
static void compare_dirs(struct kunit *test, struct tb_property_dir *d1,
struct tb_property_dir *d2)
{ … }
static void tb_test_property_copy(struct kunit *test)
{ … }
static struct kunit_case tb_test_cases[] = …;
static struct kunit_suite tb_test_suite = …;
kunit_test_suite(…) …;