linux/security/apparmor/policy_unpack_test.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * KUnit tests for AppArmor's policy unpack.
 */

#include <kunit/test.h>
#include <kunit/visibility.h>

#include "include/policy.h"
#include "include/policy_unpack.h"

#define TEST_STRING_NAME
#define TEST_STRING_DATA
#define TEST_STRING_BUF_OFFSET

#define TEST_U32_NAME
#define TEST_U32_DATA
#define TEST_NAMED_U32_BUF_OFFSET
#define TEST_U32_BUF_OFFSET

#define TEST_U16_OFFSET
#define TEST_U16_DATA

#define TEST_U64_NAME
#define TEST_U64_DATA
#define TEST_NAMED_U64_BUF_OFFSET
#define TEST_U64_BUF_OFFSET

#define TEST_BLOB_NAME
#define TEST_BLOB_DATA
#define TEST_BLOB_DATA_SIZE
#define TEST_NAMED_BLOB_BUF_OFFSET
#define TEST_BLOB_BUF_OFFSET

#define TEST_ARRAY_NAME
#define TEST_ARRAY_SIZE
#define TEST_NAMED_ARRAY_BUF_OFFSET
#define TEST_ARRAY_BUF_OFFSET

MODULE_IMPORT_NS();

struct policy_unpack_fixture {};

static struct aa_ext *build_aa_ext_struct(struct policy_unpack_fixture *puf,
					  struct kunit *test, size_t buf_size)
{}

static int policy_unpack_test_init(struct kunit *test)
{}

static void policy_unpack_test_inbounds_when_inbounds(struct kunit *test)
{}

static void policy_unpack_test_inbounds_when_out_of_bounds(struct kunit *test)
{}

static void policy_unpack_test_unpack_array_with_null_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_array_with_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_array_out_of_bounds(struct kunit *test)
{}

static void policy_unpack_test_unpack_blob_with_null_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_blob_with_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_blob_out_of_bounds(struct kunit *test)
{}

static void policy_unpack_test_unpack_str_with_null_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_str_with_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_str_out_of_bounds(struct kunit *test)
{}

static void policy_unpack_test_unpack_strdup_with_null_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_strdup_with_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_strdup_out_of_bounds(struct kunit *test)
{}

static void policy_unpack_test_unpack_nameX_with_null_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_nameX_with_wrong_code(struct kunit *test)
{}

static void policy_unpack_test_unpack_nameX_with_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_nameX_with_wrong_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_u16_chunk_basic(struct kunit *test)
{}

static void policy_unpack_test_unpack_u16_chunk_out_of_bounds_1(
		struct kunit *test)
{}

static void policy_unpack_test_unpack_u16_chunk_out_of_bounds_2(
		struct kunit *test)
{}

static void policy_unpack_test_unpack_u32_with_null_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_u32_with_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_u32_out_of_bounds(struct kunit *test)
{}

static void policy_unpack_test_unpack_u64_with_null_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_u64_with_name(struct kunit *test)
{}

static void policy_unpack_test_unpack_u64_out_of_bounds(struct kunit *test)
{}

static void policy_unpack_test_unpack_X_code_match(struct kunit *test)
{}

static void policy_unpack_test_unpack_X_code_mismatch(struct kunit *test)
{}

static void policy_unpack_test_unpack_X_out_of_bounds(struct kunit *test)
{}

static struct kunit_case apparmor_policy_unpack_test_cases[] =;

static struct kunit_suite apparmor_policy_unpack_test_module =;

kunit_test_suite();

MODULE_DESCRIPTION();
MODULE_LICENSE();