summaryrefslogtreecommitdiffstats
path: root/net/mctp/route.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@codeconstruct.com.au>2021-10-03 05:17:04 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-03 15:35:41 +0200
commit161eba50e183ed4ca20f6d8dec19bdc526d2b2b9 (patch)
tree26b414325f3bd1afee0e71b62238639a9806982e /net/mctp/route.c
parentnet: wwan: iosm: correct devlink extra params (diff)
downloadlinux-161eba50e183ed4ca20f6d8dec19bdc526d2b2b9.tar.xz
linux-161eba50e183ed4ca20f6d8dec19bdc526d2b2b9.zip
mctp: Add initial test structure and fragmentation test
This change adds the first kunit test for the mctp subsystem, and an initial test for the fragmentation path. We're adding tests under a new net/mctp/test/ directory. Incorporates a fix for module configs: Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mctp/route.c')
-rw-r--r--net/mctp/route.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mctp/route.c b/net/mctp/route.c
index e20f3096d067..04781459b2be 100644
--- a/net/mctp/route.c
+++ b/net/mctp/route.c
@@ -11,6 +11,7 @@
*/
#include <linux/idr.h>
+#include <linux/kconfig.h>
#include <linux/mctp.h>
#include <linux/netdevice.h>
#include <linux/rtnetlink.h>
@@ -1228,3 +1229,7 @@ void __exit mctp_routes_exit(void)
rtnl_unregister(PF_MCTP, RTM_GETROUTE);
dev_remove_pack(&mctp_packet_type);
}
+
+#if IS_ENABLED(CONFIG_MCTP_TEST)
+#include "test/route-test.c"
+#endif