#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/mm.h>
#include <linux/uio.h>
#include <linux/bvec.h>
#include <kunit/test.h>
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
struct kvec_test_range { … };
static const struct kvec_test_range kvec_test_ranges[] = …;
static inline u8 pattern(unsigned long x)
{ … }
static void iov_kunit_unmap(void *data)
{ … }
static void *__init iov_kunit_create_buffer(struct kunit *test,
struct page ***ppages,
size_t npages)
{ … }
static void __init iov_kunit_load_kvec(struct kunit *test,
struct iov_iter *iter, int dir,
struct kvec *kvec, unsigned int kvmax,
void *buffer, size_t bufsize,
const struct kvec_test_range *pr)
{ … }
static void __init iov_kunit_copy_to_kvec(struct kunit *test)
{ … }
static void __init iov_kunit_copy_from_kvec(struct kunit *test)
{ … }
struct bvec_test_range { … };
static const struct bvec_test_range bvec_test_ranges[] = …;
static void __init iov_kunit_load_bvec(struct kunit *test,
struct iov_iter *iter, int dir,
struct bio_vec *bvec, unsigned int bvmax,
struct page **pages, size_t npages,
size_t bufsize,
const struct bvec_test_range *pr)
{ … }
static void __init iov_kunit_copy_to_bvec(struct kunit *test)
{ … }
static void __init iov_kunit_copy_from_bvec(struct kunit *test)
{ … }
static void iov_kunit_destroy_xarray(void *data)
{ … }
static void __init iov_kunit_load_xarray(struct kunit *test,
struct iov_iter *iter, int dir,
struct xarray *xarray,
struct page **pages, size_t npages)
{ … }
static struct xarray *iov_kunit_create_xarray(struct kunit *test)
{ … }
static void __init iov_kunit_copy_to_xarray(struct kunit *test)
{ … }
static void __init iov_kunit_copy_from_xarray(struct kunit *test)
{ … }
static void __init iov_kunit_extract_pages_kvec(struct kunit *test)
{ … }
static void __init iov_kunit_extract_pages_bvec(struct kunit *test)
{ … }
static void __init iov_kunit_extract_pages_xarray(struct kunit *test)
{ … }
static struct kunit_case __refdata iov_kunit_cases[] = …;
static struct kunit_suite iov_kunit_suite = …;
kunit_test_suites(…);