]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: mctp: test: add sock test infrastructure
authorJeremy Kerr <jk@codeconstruct.com.au>
Wed, 2 Jul 2025 06:20:08 +0000 (14:20 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Jul 2025 10:39:23 +0000 (12:39 +0200)
Add a new test object, for use with the af_mctp socket code. This is
intially empty, but we'll start populating actual tests in an upcoming
change.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Link: https://patch.msgid.link/20250702-dev-forwarding-v5-8-1468191da8a4@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/mctp/af_mctp.c
net/mctp/test/route-test.c
net/mctp/test/sock-test.c [new file with mode: 0644]

index e2570d9755eac75c1384a4d576f1c7c3cc5d5b31..aef74308c18e3273008cb84aabe23ff700d0f842 100644 (file)
@@ -775,3 +775,7 @@ MODULE_DESCRIPTION("MCTP core");
 MODULE_AUTHOR("Jeremy Kerr <jk@codeconstruct.com.au>");
 
 MODULE_ALIAS_NETPROTO(PF_MCTP);
+
+#if IS_ENABLED(CONFIG_MCTP_TEST)
+#include "test/sock-test.c"
+#endif
index bbee22d33d6d3bb89cc61a0e010b8c4f07c68eae..36dd5e9ba27a0cfc6247ff321e884a9e128ee535 100644 (file)
@@ -1204,7 +1204,7 @@ static struct kunit_case mctp_test_cases[] = {
 };
 
 static struct kunit_suite mctp_test_suite = {
-       .name = "mctp",
+       .name = "mctp-route",
        .test_cases = mctp_test_cases,
 };
 
diff --git a/net/mctp/test/sock-test.c b/net/mctp/test/sock-test.c
new file mode 100644 (file)
index 0000000..abaad82
--- /dev/null
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <kunit/test.h>
+
+#include "utils.h"
+
+static struct kunit_case mctp_test_cases[] = {
+       {}
+};
+
+static struct kunit_suite mctp_test_suite = {
+       .name = "mctp-sock",
+       .test_cases = mctp_test_cases,
+};
+
+kunit_test_suite(mctp_test_suite);