linux/lib/reed_solomon/test_rslib.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Tests for Generic Reed Solomon encoder / decoder library
 *
 * Written by Ferdinand Blomqvist
 * Based on previous work by Phil Karn, KA9Q
 */
#include <linux/rslib.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/random.h>
#include <linux/slab.h>

enum verbosity {};

enum method {};

#define __param(type, name, init, msg)

__param();
__param();
__param();

struct etab {};

/* List of codes to test */
static struct etab Tab[] =;


struct estat {};

struct bcstat {};

struct wspace {};

struct pad {};

static struct pad pad_coef[] =;

static void free_ws(struct wspace *ws)
{}

static struct wspace *alloc_ws(struct rs_codec *rs)
{}


/*
 * Generates a random codeword and stores it in c. Generates random errors and
 * erasures, and stores the random word with errors in r. Erasure positions are
 * stored in derrlocs, while errlocs has one of three values in every position:
 *
 * 0 if there is no error in this position;
 * 1 if there is a symbol error in this position;
 * 2 if there is an erasure without symbol corruption.
 *
 * Returns the number of corrupted symbols.
 */
static int get_rcw_we(struct rs_control *rs, struct wspace *ws,
			int len, int errs, int eras)
{}

static void fix_err(uint16_t *data, int nerrs, uint16_t *corr, int *errlocs)
{}

static void compute_syndrome(struct rs_control *rsc, uint16_t *data,
				int len, uint16_t *syn)
{}

/* Test up to error correction capacity */
static void test_uc(struct rs_control *rs, int len, int errs,
		int eras, int trials, struct estat *stat,
		struct wspace *ws, int method)
{}

static int ex_rs_helper(struct rs_control *rs, struct wspace *ws,
			int len, int trials, int method)
{}

static int exercise_rs(struct rs_control *rs, struct wspace *ws,
		       int len, int trials)
{}

/* Tests for correct behaviour beyond error correction capacity */
static void test_bc(struct rs_control *rs, int len, int errs,
		int eras, int trials, struct bcstat *stat,
		struct wspace *ws)
{}

static int exercise_rs_bc(struct rs_control *rs, struct wspace *ws,
			  int len, int trials)
{}

static int run_exercise(struct etab *e)
{}

static int __init test_rslib_init(void)
{}

static void __exit test_rslib_exit(void)
{}

module_init()
module_exit()

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();