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:
parent
7bfbc937e6
commit
3770b07a0e
2 changed files with 6 additions and 0 deletions
|
@ -4,8 +4,12 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _main_defined 1
|
||||||
|
|
||||||
#include "_main.h"
|
#include "_main.h"
|
||||||
|
|
||||||
|
LOG_MODULE_REGISTER(net_test, CONFIG_NET_SOCKETS_LOG_LEVEL);
|
||||||
|
|
||||||
#include <zephyr/logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
#include <zephyr/net/socket.h>
|
#include <zephyr/net/socket.h>
|
||||||
#include <zephyr/ztest.h>
|
#include <zephyr/ztest.h>
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
#include <zephyr/ztest.h>
|
#include <zephyr/ztest.h>
|
||||||
|
|
||||||
|
#if !defined(_main_defined)
|
||||||
LOG_MODULE_DECLARE(net_test, CONFIG_NET_SOCKETS_LOG_LEVEL);
|
LOG_MODULE_DECLARE(net_test, CONFIG_NET_SOCKETS_LOG_LEVEL);
|
||||||
|
#endif
|
||||||
|
|
||||||
struct net_socketpair_fixture {
|
struct net_socketpair_fixture {
|
||||||
int sv[2];
|
int sv[2];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue