linux/lib/list-test.c

// SPDX-License-Identifier: GPL-2.0
/*
 * KUnit test for the Kernel Linked-list structures.
 *
 * Copyright (C) 2019, Google LLC.
 * Author: David Gow <[email protected]>
 */
#include <kunit/test.h>

#include <linux/list.h>
#include <linux/klist.h>

struct list_test_struct {};

static void list_test_list_init(struct kunit *test)
{}

static void list_test_list_add(struct kunit *test)
{}

static void list_test_list_add_tail(struct kunit *test)
{}

static void list_test_list_del(struct kunit *test)
{}

static void list_test_list_replace(struct kunit *test)
{}

static void list_test_list_replace_init(struct kunit *test)
{}

static void list_test_list_swap(struct kunit *test)
{}

static void list_test_list_del_init(struct kunit *test)
{}

static void list_test_list_del_init_careful(struct kunit *test)
{}

static void list_test_list_move(struct kunit *test)
{}

static void list_test_list_move_tail(struct kunit *test)
{}

static void list_test_list_bulk_move_tail(struct kunit *test)
{}

static void list_test_list_is_head(struct kunit *test)
{}


static void list_test_list_is_first(struct kunit *test)
{}

static void list_test_list_is_last(struct kunit *test)
{}

static void list_test_list_empty(struct kunit *test)
{}

static void list_test_list_empty_careful(struct kunit *test)
{}

static void list_test_list_rotate_left(struct kunit *test)
{}

static void list_test_list_rotate_to_front(struct kunit *test)
{}

static void list_test_list_is_singular(struct kunit *test)
{}

static void list_test_list_cut_position(struct kunit *test)
{}

static void list_test_list_cut_before(struct kunit *test)
{}

static void list_test_list_splice(struct kunit *test)
{}

static void list_test_list_splice_tail(struct kunit *test)
{}

static void list_test_list_splice_init(struct kunit *test)
{}

static void list_test_list_splice_tail_init(struct kunit *test)
{}

static void list_test_list_entry(struct kunit *test)
{}

static void list_test_list_entry_is_head(struct kunit *test)
{}

static void list_test_list_first_entry(struct kunit *test)
{}

static void list_test_list_last_entry(struct kunit *test)
{}

static void list_test_list_first_entry_or_null(struct kunit *test)
{}

static void list_test_list_next_entry(struct kunit *test)
{}

static void list_test_list_prev_entry(struct kunit *test)
{}

static void list_test_list_for_each(struct kunit *test)
{}

static void list_test_list_for_each_prev(struct kunit *test)
{}

static void list_test_list_for_each_safe(struct kunit *test)
{}

static void list_test_list_for_each_prev_safe(struct kunit *test)
{}

static void list_test_list_for_each_entry(struct kunit *test)
{}

static void list_test_list_for_each_entry_reverse(struct kunit *test)
{}

static struct kunit_case list_test_cases[] =;

static struct kunit_suite list_test_module =;

struct hlist_test_struct {};

static void hlist_test_init(struct kunit *test)
{}

static void hlist_test_unhashed(struct kunit *test)
{}

/* Doesn't test concurrency guarantees */
static void hlist_test_unhashed_lockless(struct kunit *test)
{}

static void hlist_test_del(struct kunit *test)
{}

static void hlist_test_del_init(struct kunit *test)
{}

/* Tests all three hlist_add_* functions */
static void hlist_test_add(struct kunit *test)
{}

/* Tests both hlist_fake() and hlist_add_fake() */
static void hlist_test_fake(struct kunit *test)
{}

static void hlist_test_is_singular_node(struct kunit *test)
{}

static void hlist_test_empty(struct kunit *test)
{}

static void hlist_test_move_list(struct kunit *test)
{}

static void hlist_test_entry(struct kunit *test)
{}

static void hlist_test_entry_safe(struct kunit *test)
{}

static void hlist_test_for_each(struct kunit *test)
{}


static void hlist_test_for_each_safe(struct kunit *test)
{}

static void hlist_test_for_each_entry(struct kunit *test)
{}

static void hlist_test_for_each_entry_continue(struct kunit *test)
{}

static void hlist_test_for_each_entry_from(struct kunit *test)
{}

static void hlist_test_for_each_entry_safe(struct kunit *test)
{}


static struct kunit_case hlist_test_cases[] =;

static struct kunit_suite hlist_test_module =;


static int node_count;
static struct klist_node *last_node;

static void check_node(struct klist_node *node_ptr)
{}

static void check_delete_node(struct klist_node *node_ptr)
{}

static void klist_test_add_tail(struct kunit *test)
{}

static void klist_test_add_head(struct kunit *test)
{}

static void klist_test_add_behind(struct kunit *test)
{}

static void klist_test_add_before(struct kunit *test)
{}

/*
 * Verify that klist_del() delays the deletion of a node until there
 * are no other references to it
 */
static void klist_test_del_refcount_greater_than_zero(struct kunit *test)
{}

/*
 * Verify that klist_del() deletes a node immediately when there are no
 * other references to it.
 */
static void klist_test_del_refcount_zero(struct kunit *test)
{}

static void klist_test_remove(struct kunit *test)
{}

static void klist_test_node_attached(struct kunit *test)
{}

static struct kunit_case klist_test_cases[] =;

static struct kunit_suite klist_test_module =;

kunit_test_suites();

MODULE_DESCRIPTION();
MODULE_LICENSE();