linux/lib/string_kunit.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Test cases for string functions.
 */

#define pr_fmt(fmt)

#include <kunit/test.h>
#include <linux/module.h>
#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/string.h>

#define STRCMP_LARGE_BUF_LEN
#define STRCMP_CHANGE_POINT
#define STRCMP_TEST_EXPECT_EQUAL(test, fn, ...)
#define STRCMP_TEST_EXPECT_LOWER(test, fn, ...)
#define STRCMP_TEST_EXPECT_GREATER(test, fn, ...)

static void string_test_memset16(struct kunit *test)
{}

static void string_test_memset32(struct kunit *test)
{}

static void string_test_memset64(struct kunit *test)
{}

static void string_test_strchr(struct kunit *test)
{}

static void string_test_strnchr(struct kunit *test)
{}

static void string_test_strspn(struct kunit *test)
{}

static char strcmp_buffer1[STRCMP_LARGE_BUF_LEN];
static char strcmp_buffer2[STRCMP_LARGE_BUF_LEN];

static void strcmp_fill_buffers(char fill1, char fill2)
{}

static void string_test_strcmp(struct kunit *test)
{}

static void string_test_strcmp_long_strings(struct kunit *test)
{}

static void string_test_strncmp(struct kunit *test)
{}

static void string_test_strncmp_long_strings(struct kunit *test)
{}

static void string_test_strcasecmp(struct kunit *test)
{}

static void string_test_strcasecmp_long_strings(struct kunit *test)
{}

static void string_test_strncasecmp(struct kunit *test)
{}

static void string_test_strncasecmp_long_strings(struct kunit *test)
{}

/**
 * strscpy_check() - Run a specific test case.
 * @test: KUnit test context pointer
 * @src: Source string, argument to strscpy_pad()
 * @count: Size of destination buffer, argument to strscpy_pad()
 * @expected: Expected return value from call to strscpy_pad()
 * @chars: Number of characters from the src string expected to be
 *         written to the dst buffer.
 * @terminator: 1 if there should be a terminating null byte 0 otherwise.
 * @pad: Number of pad characters expected (in the tail of dst buffer).
 *       (@pad does not include the null terminator byte.)
 *
 * Calls strscpy_pad() and verifies the return value and state of the
 * destination buffer after the call returns.
 */
static void strscpy_check(struct kunit *test, char *src, int count,
			  int expected, int chars, int terminator, int pad)
{}

static void string_test_strscpy(struct kunit *test)
{}

static volatile int unconst;

static void string_test_strcat(struct kunit *test)
{}

static void string_test_strncat(struct kunit *test)
{}

static void string_test_strlcat(struct kunit *test)
{}

static void string_test_strtomem(struct kunit *test)
{}


static void string_test_memtostr(struct kunit *test)
{}

static struct kunit_case string_test_cases[] =;

static struct kunit_suite string_test_suite =;

kunit_test_suites();

MODULE_DESCRIPTION();
MODULE_LICENSE();