From: Jeremy Kerr Date: Wed, 2 Jul 2025 06:20:08 +0000 (+0800) Subject: net: mctp: test: add sock test infrastructure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19396179a0f1f912b22c051afb468482b0d9466f;p=thirdparty%2Flinux.git net: mctp: test: add sock test infrastructure 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 Link: https://patch.msgid.link/20250702-dev-forwarding-v5-8-1468191da8a4@codeconstruct.com.au Signed-off-by: Paolo Abeni --- diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c index e2570d9755eac..aef74308c18e3 100644 --- a/net/mctp/af_mctp.c +++ b/net/mctp/af_mctp.c @@ -775,3 +775,7 @@ MODULE_DESCRIPTION("MCTP core"); MODULE_AUTHOR("Jeremy Kerr "); MODULE_ALIAS_NETPROTO(PF_MCTP); + +#if IS_ENABLED(CONFIG_MCTP_TEST) +#include "test/sock-test.c" +#endif diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c index bbee22d33d6d3..36dd5e9ba27a0 100644 --- a/net/mctp/test/route-test.c +++ b/net/mctp/test/route-test.c @@ -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 index 0000000000000..abaad82b4e256 --- /dev/null +++ b/net/mctp/test/sock-test.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +#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);