tests: net: socketpair: Fix log printing

The LOG_MODULE_REGISTER() was not called anywhere so if one tried
to enable logging, there was a linker error about missing logger
functions.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
Jukka Rissanen 2024-05-17 08:02:08 +03:00 committed by Johan Hedberg
commit 3770b07a0e
2 changed files with 6 additions and 0 deletions

View file

@ -4,8 +4,12 @@
* SPDX-License-Identifier: Apache-2.0
*/
#define _main_defined 1
#include "_main.h"
LOG_MODULE_REGISTER(net_test, CONFIG_NET_SOCKETS_LOG_LEVEL);
#include <zephyr/logging/log.h>
#include <zephyr/net/socket.h>
#include <zephyr/ztest.h>

View file

@ -16,7 +16,9 @@
#include <zephyr/sys/util.h>
#include <zephyr/ztest.h>
#if !defined(_main_defined)
LOG_MODULE_DECLARE(net_test, CONFIG_NET_SOCKETS_LOG_LEVEL);
#endif
struct net_socketpair_fixture {
int sv[2];