#include <kunit/test.h>
#include "vcap_api.h"
#include "vcap_api_client.h"
#include "vcap_api_debugfs.h"
#include "vcap_model_kunit.h"
#define TEST_BUF_CNT …
#define TEST_BUF_SZ …
#define STREAMWSIZE …
static u32 test_updateaddr[STREAMWSIZE] = …;
static int test_updateaddridx;
static int test_cache_erase_count;
static u32 test_init_start;
static u32 test_init_count;
static u32 test_hw_counter_id;
static struct vcap_cache_data test_hw_cache;
static struct net_device test_netdev = …;
static int test_move_addr;
static int test_move_offset;
static int test_move_count;
static char test_pr_buffer[TEST_BUF_CNT][TEST_BUF_SZ];
static int test_pr_bufferidx;
static int test_pr_idx;
static enum vcap_keyfield_set test_val_keyset(struct net_device *ndev,
struct vcap_admin *admin,
struct vcap_rule *rule,
struct vcap_keyset_list *kslist,
u16 l3_proto)
{ … }
static void test_add_def_fields(struct net_device *ndev,
struct vcap_admin *admin,
struct vcap_rule *rule)
{ … }
static void test_cache_erase(struct vcap_admin *admin)
{ … }
static void test_cache_init(struct net_device *ndev, struct vcap_admin *admin,
u32 start, u32 count)
{ … }
static void test_cache_read(struct net_device *ndev, struct vcap_admin *admin,
enum vcap_selection sel, u32 start, u32 count)
{ … }
static void test_cache_write(struct net_device *ndev, struct vcap_admin *admin,
enum vcap_selection sel, u32 start, u32 count)
{ … }
static void test_cache_update(struct net_device *ndev, struct vcap_admin *admin,
enum vcap_command cmd,
enum vcap_selection sel, u32 addr)
{ … }
static void test_cache_move(struct net_device *ndev, struct vcap_admin *admin,
u32 addr, int offset, int count)
{ … }
static int vcap_test_port_info(struct net_device *ndev,
struct vcap_admin *admin,
struct vcap_output_print *out)
{ … }
static const struct vcap_operations test_callbacks = …;
static struct vcap_control test_vctrl = …;
static void vcap_test_api_init(struct vcap_admin *admin)
{ … }
static __printf(2, 3)
int test_prf(void *out, const char *fmt, ...)
{ … }
static void vcap_api_addr_keyset_test(struct kunit *test)
{ … }
static void vcap_api_show_admin_raw_test(struct kunit *test)
{ … }
static const char * const test_admin_info_expect[] = …;
static void vcap_api_show_admin_test(struct kunit *test)
{ … }
static const char * const test_admin_expect[] = …;
static void vcap_api_show_admin_rule_test(struct kunit *test)
{ … }
static struct kunit_case vcap_api_debugfs_test_cases[] = …;
static struct kunit_suite vcap_api_debugfs_test_suite = …;
kunit_test_suite(…) …;