#include <kunit/device.h>
#include <kunit/test.h>
#include <linux/fpga/fpga-mgr.h>
#include <linux/module.h>
#include <linux/scatterlist.h>
#include <linux/types.h>
#define HEADER_FILL …
#define IMAGE_FILL …
#define IMAGE_BLOCK …
#define HEADER_SIZE …
#define IMAGE_SIZE …
struct mgr_stats { … };
struct mgr_ctx { … };
static char *init_test_buffer(struct kunit *test, size_t count)
{ … }
static int op_parse_header(struct fpga_manager *mgr, struct fpga_image_info *info,
const char *buf, size_t count)
{ … }
static int op_write_init(struct fpga_manager *mgr, struct fpga_image_info *info,
const char *buf, size_t count)
{ … }
static int op_write(struct fpga_manager *mgr, const char *buf, size_t count)
{ … }
static int op_write_sg(struct fpga_manager *mgr, struct sg_table *sgt)
{ … }
static int op_write_complete(struct fpga_manager *mgr, struct fpga_image_info *info)
{ … }
static const struct fpga_manager_ops fake_mgr_ops = …;
static void fpga_mgr_test_get(struct kunit *test)
{ … }
static void fpga_mgr_test_lock(struct kunit *test)
{ … }
static void fpga_mgr_test_img_load_buf(struct kunit *test)
{ … }
static void fpga_mgr_test_img_load_sgt(struct kunit *test)
{ … }
static int fpga_mgr_test_init(struct kunit *test)
{ … }
static void fpga_mgr_test_exit(struct kunit *test)
{ … }
static struct kunit_case fpga_mgr_test_cases[] = …;
static struct kunit_suite fpga_mgr_suite = …;
kunit_test_suite(…) …;
MODULE_LICENSE(…) …;