mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-10 20:31:27 +01:00
ktest: make ktest work with Netlink loaded as a module.
MFC after: 2 weeks
This commit is contained in:
parent
08300d8494
commit
0eb0d23335
@ -9,5 +9,6 @@ SYSDIR?=${SRCTOP}/sys
|
||||
|
||||
KMOD= ktest_example
|
||||
SRCS= ktest_example.c
|
||||
SRCS+= opt_netlink.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
@ -94,7 +94,7 @@ static struct ktest_module_info _module_info = { \
|
||||
}; \
|
||||
\
|
||||
static moduledata_t _module_data = { \
|
||||
"__" #_n "_module", \
|
||||
#_n, \
|
||||
ktest_default_modevent, \
|
||||
&_module_info, \
|
||||
}; \
|
||||
@ -102,6 +102,7 @@ static moduledata_t _module_data = { \
|
||||
DECLARE_MODULE(ktest_##_n, _module_data, SI_SUB_PSEUDO, SI_ORDER_ANY); \
|
||||
MODULE_VERSION(ktest_##_n, 1); \
|
||||
MODULE_DEPEND(ktest_##_n, ktestmod, 1, 1, 1); \
|
||||
MODULE_DEPEND(ktest_##_n, netlink, 1, 1, 1); \
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
@ -91,7 +91,7 @@ class KtestLoader(object):
|
||||
|
||||
ret = []
|
||||
for rx_msg in NetlinkMultipartIterator(self.nlsock, nlmsg_seq, self.family_id):
|
||||
# test_msg.print_message()
|
||||
# rx_msg.print_message()
|
||||
tst = {
|
||||
"mod_name": rx_msg.get_nla(KtestAttrType.KTEST_ATTR_MOD_NAME).text,
|
||||
"name": rx_msg.get_nla(KtestAttrType.KTEST_ATTR_TEST_NAME).text,
|
||||
|
Loading…
Reference in New Issue
Block a user