tests/ktest_netlink_message_writer: remove INVARIANTS requirement
INVARIANTS is meant to be used to enable extra sanity checking for internal structures, not enable/disable tests in the freebsd kyua test suite. STABLE branches include a GENERIC kernconf without INVARIANTS, so ktest_netlink_message_writer is broken on such branches: https://ci.freebsd.org/job/FreeBSD-stable-15-amd64-test/253/testReport/sys.netlink.test_netlink_message_writer/py/__test_cases_list__/ Reviewed by: lwhsu, imp Approved by: lwhsu (mentor) Pull Request: https://github.com/freebsd/freebsd-src/pull/1889 MFC after: 3 days Signed-off-by: Siva Mahadevan <siva@FreeBSD.org> Sponsored by: The FreeBSD Foundation
This commit is contained in:
@@ -37,8 +37,6 @@
|
||||
#define KTEST_CALLER
|
||||
#include <netlink/ktest_netlink_message_writer.h>
|
||||
|
||||
#ifdef INVARIANTS
|
||||
|
||||
struct test_nlbuf_attrs {
|
||||
uint32_t size;
|
||||
uint32_t expected_avail;
|
||||
@@ -98,16 +96,13 @@ test_nlbuf_writer_allocation(struct ktest_test_context *ctx)
|
||||
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct ktest_test_info tests[] = {
|
||||
#ifdef INVARIANTS
|
||||
{
|
||||
.name = "test_nlbuf_writer_allocation",
|
||||
.desc = "test different buffer sizes in the netlink writer",
|
||||
.func = &test_nlbuf_writer_allocation,
|
||||
.parse = &test_nlbuf_parser,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
KTEST_MODULE_DECLARE(ktest_netlink_message_writer, tests);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#ifndef _NETLINK_KTEST_NETLINK_MESSAGE_WRITER_H_
|
||||
#define _NETLINK_KTEST_NETLINK_MESSAGE_WRITER_H_
|
||||
|
||||
#if defined(_KERNEL) && defined(INVARIANTS)
|
||||
#if defined(_KERNEL)
|
||||
|
||||
bool nlmsg_get_buf_wrapper(struct nl_writer *nw, size_t size, bool waitok);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user