Skip to content

Commit 6e4ef14

Browse files
committed
string: Prepare to merge strcat KUnit tests into string_kunit.c
The test naming convention differs between string_kunit.c and strcat_kunit.c. Move "test" to the beginning of the function name. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20240419140155.3028912-3-keescook@chromium.org Signed-off-by: Kees Cook <keescook@chromium.org>
1 parent bb8d9b7 commit 6e4ef14

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/strcat_kunit.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
static volatile int unconst;
1212

13-
static void strcat_test(struct kunit *test)
13+
static void test_strcat(struct kunit *test)
1414
{
1515
char dest[8];
1616

@@ -29,7 +29,7 @@ static void strcat_test(struct kunit *test)
2929
KUNIT_EXPECT_STREQ(test, dest, "fourAB");
3030
}
3131

32-
static void strncat_test(struct kunit *test)
32+
static void test_strncat(struct kunit *test)
3333
{
3434
char dest[8];
3535

@@ -56,7 +56,7 @@ static void strncat_test(struct kunit *test)
5656
KUNIT_EXPECT_STREQ(test, dest, "fourAB");
5757
}
5858

59-
static void strlcat_test(struct kunit *test)
59+
static void test_strlcat(struct kunit *test)
6060
{
6161
char dest[8] = "";
6262
int len = sizeof(dest) + unconst;
@@ -88,9 +88,9 @@ static void strlcat_test(struct kunit *test)
8888
}
8989

9090
static struct kunit_case strcat_test_cases[] = {
91-
KUNIT_CASE(strcat_test),
92-
KUNIT_CASE(strncat_test),
93-
KUNIT_CASE(strlcat_test),
91+
KUNIT_CASE(test_strcat),
92+
KUNIT_CASE(test_strncat),
93+
KUNIT_CASE(test_strlcat),
9494
{}
9595
};
9696

0 commit comments

Comments
 (0)