tests: net: Convert to new logging system
Use new logging system with support for network log level. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
5ad399e0d1
commit
f3f04bf9eb
|
@ -15,12 +15,7 @@ CONFIG_NET_PKT_TX_COUNT=1
|
|||
CONFIG_NET_BUF_RX_COUNT=3
|
||||
CONFIG_NET_BUF_TX_COUNT=3
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_NET_DEBUG_IF=y
|
||||
CONFIG_NET_DEBUG_CORE=y
|
||||
CONFIG_NET_DEBUG_6LO=y
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_NET_DEFAULT_LOG_LEVEL_WRN=y
|
||||
|
||||
CONFIG_NET_6LO_CONTEXT=y
|
||||
#Before modifying this value, add respective code in src/main.c
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_6LO_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <ztest.h>
|
||||
#include <linker/sections.h>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
# applications.
|
||||
|
||||
# Generic options that are useful to be active
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_ZTEST=y
|
||||
|
@ -12,16 +11,16 @@ CONFIG_ZTEST=y
|
|||
# net_buf options
|
||||
CONFIG_NET_BUF=y
|
||||
CONFIG_NET_BUF_LOG=y
|
||||
CONFIG_SYS_LOG_NET_BUF_LEVEL=4
|
||||
CONFIG_NET_BUF_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_BUF_WARN_ALLOC_INTERVAL=2
|
||||
CONFIG_NET_BUF_SIMPLE_LOG=y
|
||||
CONFIG_NET_BUF_POOL_USAGE=y
|
||||
|
||||
# Core IP options
|
||||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_INIT_PRIO=98
|
||||
CONFIG_NET_SHELL=y
|
||||
CONFIG_NET_IP_ADDR_CHECK=y
|
||||
CONFIG_NET_HOSTNAME_ENABLE=y
|
||||
|
||||
# Statistics
|
||||
CONFIG_NET_STATISTICS=y
|
||||
|
@ -60,14 +59,14 @@ CONFIG_NET_L2_BT_ZEP1656=y
|
|||
CONFIG_NET_L2_BT_SEC_LEVEL=4
|
||||
CONFIG_NET_L2_BT_MGMT=y
|
||||
CONFIG_NET_L2_BT_SHELL=y
|
||||
CONFIG_NET_DEBUG_L2_IEEE802154=y
|
||||
CONFIG_NET_L2_IEEE802154_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_DEBUG_L2_IEEE802154_FRAGMENT=y
|
||||
CONFIG_NET_DEBUG_L2_ETHERNET=y
|
||||
CONFIG_NET_DEBUG_L2_BT=y
|
||||
CONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_L2_BT_LOG_LEVEL_DBG=y
|
||||
|
||||
# IP offload support
|
||||
CONFIG_NET_OFFLOAD=y
|
||||
CONFIG_NET_DEBUG_NET_OFFLOAD=y
|
||||
CONFIG_NET_OFFLOAD_LOG_LEVEL_DBG=y
|
||||
|
||||
# RPL
|
||||
CONFIG_NET_RPL=y
|
||||
|
@ -77,7 +76,7 @@ CONFIG_NET_RPL_MC_ENERGY=y
|
|||
CONFIG_NET_RPL_MOP2=n
|
||||
CONFIG_NET_RPL_MOP3=y
|
||||
CONFIG_NET_RPL_DAO_MAX_RETRANSMISSIONS=2
|
||||
CONFIG_NET_DEBUG_RPL=y
|
||||
CONFIG_NET_RPL_LOG_LEVEL_DBG=y
|
||||
|
||||
# Routing table
|
||||
CONFIG_NET_MAX_ROUTERS=3
|
||||
|
@ -86,12 +85,12 @@ CONFIG_NET_ROUTE_MCAST=y
|
|||
|
||||
# TCP
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_DEBUG_TCP=y
|
||||
CONFIG_NET_TCP_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_TCP_TIME_WAIT_DELAY=20000
|
||||
|
||||
# UDP
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NET_DEBUG_UDP=y
|
||||
CONFIG_NET_UDP_LOG_LEVEL_DBG=y
|
||||
|
||||
# Network context
|
||||
CONFIG_NET_MAX_CONN=10
|
||||
|
@ -105,7 +104,7 @@ CONFIG_NET_CONTEXT_CHECK=y
|
|||
|
||||
# Trickle algo
|
||||
CONFIG_NET_TRICKLE=y
|
||||
CONFIG_NET_DEBUG_TRICKLE=y
|
||||
CONFIG_NET_TRICKLE_LOG_LEVEL_DBG=y
|
||||
|
||||
# Network buffer
|
||||
CONFIG_NET_PKT_RX_COUNT=10
|
||||
|
@ -130,15 +129,15 @@ CONFIG_NET_IPV6_NBR_CACHE=y
|
|||
CONFIG_NET_IPV6_ND=y
|
||||
CONFIG_NET_IPV6_DAD=y
|
||||
CONFIG_NET_IPV6_RA_RDNSS=y
|
||||
CONFIG_NET_DEBUG_IPV6=y
|
||||
CONFIG_NET_DEBUG_ICMPV6=y
|
||||
CONFIG_NET_DEBUG_IPV6_NBR_CACHE=y
|
||||
CONFIG_NET_IPV6_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_IPV6_NBR_CACHE_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_ICMPV6_LOG_LEVEL_DBG=y
|
||||
|
||||
# 6lo
|
||||
CONFIG_NET_6LO=y
|
||||
CONFIG_NET_6LO_CONTEXT=y
|
||||
CONFIG_NET_MAX_6LO_CONTEXTS=2
|
||||
CONFIG_NET_DEBUG_6LO=y
|
||||
CONFIG_NET_6LO_LOG_LEVEL_DBG=y
|
||||
|
||||
# Sample application generic options
|
||||
CONFIG_NET_CONFIG_SETTINGS=y
|
||||
|
@ -160,7 +159,7 @@ CONFIG_NET_MGMT_EVENT=y
|
|||
CONFIG_NET_MGMT_EVENT_STACK_SIZE=800
|
||||
CONFIG_NET_MGMT_EVENT_THREAD_PRIO=66
|
||||
CONFIG_NET_MGMT_EVENT_QUEUE_SIZE=2
|
||||
CONFIG_NET_DEBUG_MGMT_EVENT=y
|
||||
CONFIG_NET_MGMT_EVENT_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_DEBUG_MGMT_EVENT_STACK=y
|
||||
|
||||
# IPv4
|
||||
|
@ -170,27 +169,26 @@ CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=2
|
|||
CONFIG_NET_IF_MCAST_IPV4_ADDR_COUNT=2
|
||||
CONFIG_NET_DHCPV4=y
|
||||
CONFIG_NET_IPV4_AUTO=y
|
||||
CONFIG_NET_DEBUG_IPV4=y
|
||||
CONFIG_NET_DEBUG_ICMPV4=y
|
||||
CONFIG_NET_DEBUG_DHCPV4=y
|
||||
CONFIG_NET_IPV4_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_IPV4_AUTO_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_ICMPV4_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_DHCPV4_LOG_LEVEL_DBG=y
|
||||
|
||||
# ARP
|
||||
CONFIG_NET_ARP=y
|
||||
CONFIG_NET_ARP_TABLE_SIZE=3
|
||||
CONFIG_NET_DEBUG_ARP=y
|
||||
CONFIG_NET_ARP_LOG_LEVEL_DBG=y
|
||||
|
||||
# Logging
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_NET_LOG_GLOBAL=y
|
||||
CONFIG_NET_DEBUG_CORE=y
|
||||
CONFIG_NET_DEBUG_IF=y
|
||||
CONFIG_NET_DEBUG_UTILS=y
|
||||
CONFIG_NET_DEBUG_CONTEXT=y
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_NET_CORE_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_IF_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_UTILS_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_CONTEXT_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_PKT_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_DEBUG_NET_PKT_EXTERNALS=4
|
||||
CONFIG_NET_DEBUG_CONN=y
|
||||
CONFIG_NET_DEBUG_ROUTE=y
|
||||
CONFIG_NET_CONN_LOG_LEVEL_DBG=y
|
||||
CONFIG_NET_ROUTE_LOG_LEVEL_DBG=y
|
||||
|
||||
# IP threads stack size
|
||||
CONFIG_NET_TX_STACK_SIZE=1024
|
||||
|
@ -209,10 +207,15 @@ CONFIG_DNS_SERVER3="192.0.2.42"
|
|||
CONFIG_DNS_SERVER4="2001:db8::2"
|
||||
CONFIG_DNS_SERVER5="192.0.2.11:1000"
|
||||
CONFIG_DNS_NUM_CONCUR_QUERIES=2
|
||||
CONFIG_NET_DEBUG_DNS_RESOLVE=y
|
||||
CONFIG_DNS_RESOLVER_LOG_LEVEL_DBG=y
|
||||
CONFIG_MDNS_RESPONDER=y
|
||||
CONFIG_MDNS_RESPONDER_LOG_LEVEL_DBG=y
|
||||
CONFIG_LLMNR_RESPONDER=y
|
||||
CONFIG_LLMNR_RESPONDER_LOG_LEVEL_DBG=y
|
||||
|
||||
# CoAP
|
||||
CONFIG_COAP=y
|
||||
CONFIG_COAP_LOG_LEVEL_DBG=y
|
||||
|
||||
# MQTT
|
||||
CONFIG_MQTT_LIB=y
|
||||
|
@ -226,6 +229,7 @@ CONFIG_HTTP_SERVER=y
|
|||
CONFIG_HTTP_CLIENT=y
|
||||
CONFIG_HTTP_PARSER=y
|
||||
CONFIG_HTTP_PARSER_STRICT=y
|
||||
CONFIG_HTTP_LOG_LEVEL_DBG=y
|
||||
|
||||
# VLAN
|
||||
CONFIG_NET_VLAN=y
|
||||
|
@ -233,4 +237,4 @@ CONFIG_NET_VLAN=y
|
|||
# gPTP
|
||||
CONFIG_NET_GPTP=y
|
||||
CONFIG_NET_GPTP_STATISTICS=y
|
||||
CONFIG_NET_DEBUG_GPTP=y
|
||||
CONFIG_NET_GPTP_LOG_LEVEL_DBG=y
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL LOG_LEVEL_DBG
|
||||
|
||||
#include <ztest.h>
|
||||
|
||||
#include <net/net_if.h>
|
||||
|
|
|
@ -8,7 +8,6 @@ CONFIG_NET_DHCPV4=n
|
|||
CONFIG_NET_MAX_CONTEXTS=10
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
@ -30,6 +29,3 @@ CONFIG_NET_CONFIG_SETTINGS=y
|
|||
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1"
|
||||
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
|
||||
CONFIG_ZTEST=y
|
||||
#CONFIG_NET_DEBUG_APP=y
|
||||
#CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
#CONFIG_NET_SHELL=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_APP_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -26,7 +29,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_IF)
|
||||
#if defined(CONFIG_NET_APP_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
|
|
@ -10,14 +10,8 @@ CONFIG_NET_PKT_TX_COUNT=10
|
|||
CONFIG_NET_BUF_RX_COUNT=20
|
||||
CONFIG_NET_BUF_TX_COUNT=20
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=3
|
||||
CONFIG_NET_DEBUG_ARP=y
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_NET_DEBUG_IF=y
|
||||
CONFIG_NET_DEBUG_CORE=y
|
||||
CONFIG_NET_DEBUG_L2_ETHERNET=y
|
||||
CONFIG_NET_IPV6=n
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_ARP_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <linker/sections.h>
|
||||
|
||||
|
|
|
@ -2,5 +2,5 @@ CONFIG_NET_BUF=y
|
|||
CONFIG_NET_TEST=y
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=4096
|
||||
#CONFIG_NET_BUF_LOG=y
|
||||
#CONFIG_SYS_LOG_NET_BUF_LEVEL=4
|
||||
#CONFIG_NET_BUF_LOG_LEVEL_DBG=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -8,7 +8,6 @@ CONFIG_NET_ARP=n
|
|||
CONFIG_NET_MAX_CONTEXTS=4
|
||||
CONFIG_NET_L2_ETHERNET=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
@ -24,14 +23,6 @@ CONFIG_NET_IPV6_ND=n
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_NET_APP=n
|
||||
CONFIG_NET_CONFIG_SETTINGS=n
|
||||
CONFIG_NET_DEBUG_L2_ETHERNET=n
|
||||
CONFIG_NET_DEBUG_CONTEXT=n
|
||||
CONFIG_NET_DEBUG_IF=n
|
||||
CONFIG_NET_DEBUG_CORE=n
|
||||
CONFIG_NET_DEBUG_IPV6=n
|
||||
CONFIG_NET_DEBUG_IPV4=n
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_NET_SHELL=n
|
||||
|
||||
# Disable internal ethernet drivers as the test is self contained
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_L2_ETHERNET_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -28,7 +31,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -279,7 +282,7 @@ struct user_data {
|
|||
int total_if_count;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
static const char *iface2str(struct net_if *iface)
|
||||
{
|
||||
#ifdef CONFIG_NET_L2_ETHERNET
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_NET_CONTEXT_CHECK=y
|
|||
CONFIG_NET_CONTEXT_SYNC_RECV=y
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_ND=n
|
||||
|
@ -20,12 +19,4 @@ CONFIG_NET_PKT_TX_COUNT=10
|
|||
CONFIG_NET_PKT_RX_COUNT=5
|
||||
CONFIG_NET_BUF_RX_COUNT=10
|
||||
CONFIG_NET_BUF_TX_COUNT=10
|
||||
#CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
#CONFIG_NET_DEBUG_IPV6=y
|
||||
#CONFIG_NET_DEBUG_CONTEXT=y
|
||||
#CONFIG_NET_DEBUG_CORE=y
|
||||
#CONFIG_NET_DEBUG_IF=y
|
||||
#CONFIG_NET_DEBUG_UTILS=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
#CONFIG_NET_DEBUG_CONN=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_CONTEXT_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <ztest.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -26,7 +29,7 @@
|
|||
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_CONTEXT)
|
||||
#if defined(CONFIG_NET_CONTEXT_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
|
|
@ -9,21 +9,11 @@ CONFIG_NET_PKT_TX_COUNT=4
|
|||
CONFIG_NET_BUF_RX_COUNT=7
|
||||
CONFIG_NET_BUF_TX_COUNT=7
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1
|
||||
CONFIG_NET_DEBUG_IF=y
|
||||
CONFIG_NET_DEBUG_CORE=y
|
||||
CONFIG_NET_DEBUG_ICMPV4=y
|
||||
CONFIG_NET_DEBUG_DHCPV4=y
|
||||
CONFIG_NET_DEBUG_IPV4=y
|
||||
CONFIG_NET_DEBUG_CONN=y
|
||||
CONFIG_NET_IPV4=y
|
||||
CONFIG_NET_IPV6=n
|
||||
#CONFIG_NET_DEBUG_L2_ETHERNET=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
|
||||
CONFIG_NET_MGMT=y
|
||||
CONFIG_NET_MGMT_EVENT=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_DHCPV4_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <linker/sections.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ CONFIG_MAIN_STACK_SIZE=2048
|
|||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_TEST=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_NET_MGMT=y
|
||||
CONFIG_NET_MGMT_EVENT=y
|
||||
CONFIG_NET_L2_ETHERNET=y
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_L2_ETHERNET_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
|
||||
#include <net/net_if.h>
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_NET_PKT_TX_COUNT=2
|
|||
CONFIG_NET_BUF_RX_COUNT=5
|
||||
CONFIG_NET_BUF_TX_COUNT=5
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_ICMPV6_LOG_LEVEL
|
||||
|
||||
#include <errno.h>
|
||||
#include <zephyr/types.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -11,30 +11,16 @@ CONFIG_NET_IPV6=y
|
|||
CONFIG_NET_IPV6_RA_RDNSS=y
|
||||
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=2
|
||||
|
||||
CONFIG_NET_DEBUG_6LO=y
|
||||
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_PRINTK=y
|
||||
|
||||
CONFIG_NET_DEBUG_CORE=y
|
||||
CONFIG_NET_DEBUG_IPV6_NBR_CACHE=y
|
||||
CONFIG_NET_DEBUG_IPV6=y
|
||||
CONFIG_NET_DEBUG_CONTEXT=y
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_NET_DEBUG_UTILS=y
|
||||
CONFIG_NET_DEBUG_IF=y
|
||||
CONFIG_NET_DEBUG_ICMPV6=y
|
||||
CONFIG_NET_DEBUG_CONN=y
|
||||
CONFIG_NET_STATISTICS=y
|
||||
|
||||
CONFIG_NET_L2_IEEE802154=y
|
||||
CONFIG_NET_DEBUG_L2_IEEE802154=y
|
||||
CONFIG_NET_L2_IEEE802154_RFD=y
|
||||
|
||||
CONFIG_IEEE802154_CC2520=y
|
||||
CONFIG_SYS_LOG_IEEE802154_DRIVER_LEVEL=4
|
||||
|
||||
CONFIG_NET_L2_IEEE802154_SHELL=y
|
||||
|
||||
|
|
|
@ -4,11 +4,8 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#if 1
|
||||
#define SYS_LOG_DOMAIN "15.4 crypto"
|
||||
#define NET_SYS_LOG_LEVEL SYS_LOG_LEVEL_DEBUG
|
||||
#define NET_LOG_ENABLED 1
|
||||
#endif
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL LOG_LEVEL_DBG
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <errno.h>
|
||||
|
|
|
@ -16,9 +16,3 @@ CONFIG_NET_BUF_RX_COUNT=35
|
|||
CONFIG_NET_BUF_TX_COUNT=35
|
||||
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_NET_DEBUG_IF=y
|
||||
CONFIG_NET_DEBUG_CORE=y
|
||||
CONFIG_NET_DEBUG_6LO=n
|
||||
CONFIG_NET_DEBUG_L2_IEEE802154_FRAGMENT=y
|
||||
CONFIG_NET_DEBUG_NET_PKT=n
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_L2_IEEE802154_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <linker/sections.h>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ CONFIG_NET_TEST=y
|
|||
CONFIG_NET_BUF=y
|
||||
CONFIG_NET_IPV6=y
|
||||
CONFIG_NET_L2_IEEE802154=y
|
||||
CONFIG_NET_DEBUG_L2_IEEE802154=y
|
||||
CONFIG_NET_L2_IEEE802154_SECURITY=y
|
||||
CONFIG_NET_L2_IEEE802154_ACK_REPLY=y
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
||||
|
@ -12,9 +11,7 @@ CONFIG_NET_PKT_TX_COUNT=5
|
|||
CONFIG_NET_BUF_RX_COUNT=10
|
||||
CONFIG_NET_BUF_TX_COUNT=10
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=1
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_NET_LOG_NET_DEFAULT=2
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_DEBUG_IPV6=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_NET_L2_DUMMY=y
|
|||
CONFIG_NET_L2_ETHERNET=y
|
||||
CONFIG_NET_L2_ETHERNET_MGMT=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
@ -24,5 +23,3 @@ CONFIG_NET_MAX_NEXTHOPS=8
|
|||
CONFIG_NET_IPV6_MAX_NEIGHBORS=8
|
||||
CONFIG_NET_IPV6_ND=n
|
||||
CONFIG_ZTEST=y
|
||||
#CONFIG_NET_DEBUG_IF=y
|
||||
#CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_IF_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -24,7 +27,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_IF)
|
||||
#if defined(CONFIG_NET_IF_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -263,7 +266,7 @@ static int eth_fake_init(struct device *dev)
|
|||
ETH_NET_DEVICE_INIT(eth_fake, "eth_fake", eth_fake_init, ð_fake_data,
|
||||
NULL, CONFIG_ETH_INIT_PRIORITY, ð_fake_api_funcs, 1500);
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_IF)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
static const char *iface2str(struct net_if *iface)
|
||||
{
|
||||
if (net_if_l2(iface) == &NET_L2_GET_NAME(ETHERNET)) {
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NET_PKT_TX_COUNT=2
|
|||
CONFIG_NET_BUF_RX_COUNT=5
|
||||
CONFIG_NET_BUF_TX_COUNT=5
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_IPV6_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
@ -23,7 +26,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_IPV6) || defined(CONFIG_NET_DEBUG_IPV4)
|
||||
#if defined(CONFIG_NET_IPV6_LOG_LEVEL) || defined(CONFIG_NET_IPV4_LOG_LEVEL)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_NET_TCP=n
|
|||
CONFIG_NET_IPV4=n
|
||||
CONFIG_NET_L2_ETHERNET=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_ND=y
|
||||
|
@ -24,12 +23,4 @@ CONFIG_NET_MAX_ROUTERS=2
|
|||
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=9
|
||||
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=7
|
||||
CONFIG_NET_IF_IPV6_PREFIX_COUNT=3
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
#CONFIG_NET_DEBUG_IF=y
|
||||
#CONFIG_NET_DEBUG_CORE=y
|
||||
#CONFIG_NET_DEBUG_IPV6=y
|
||||
#CONFIG_NET_DEBUG_ICMPV6=y
|
||||
#CONFIG_NET_DEBUG_L2_ETHERNET=y
|
||||
#CONFIG_NET_DEBUG_UTILS=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
#CONFIG_NET_DEBUG_6LO=y
|
||||
CONFIG_NET_DEFAULT_LOG_LEVEL_WRN=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_IPV6_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -15,9 +18,9 @@
|
|||
|
||||
#include <ztest.h>
|
||||
|
||||
#include <net/net_core.h>
|
||||
#include <net/net_pkt.h>
|
||||
#include <net/net_ip.h>
|
||||
#include <net/net_core.h>
|
||||
#include <net/ethernet.h>
|
||||
|
||||
#include "icmpv6.h"
|
||||
|
|
|
@ -7,7 +7,6 @@ CONFIG_NET_IPV4=n
|
|||
CONFIG_NET_MAX_CONTEXTS=4
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
@ -24,14 +23,6 @@ CONFIG_NET_IPV6_FRAGMENT=y
|
|||
|
||||
CONFIG_ZTEST=y
|
||||
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_NET_STATISTICS=n
|
||||
|
||||
CONFIG_NET_DEBUG_IF=n
|
||||
CONFIG_NET_DEBUG_CONN=n
|
||||
CONFIG_NET_DEBUG_IPV6=n
|
||||
CONFIG_NET_DEBUG_ICMPV6=n
|
||||
CONFIG_NET_DEBUG_CORE=n
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_IPV6_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -27,7 +30,7 @@
|
|||
#include "ipv6.h"
|
||||
#include "udp_internal.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_IPV6)
|
||||
#if defined(CONFIG_NET_IPV6_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
|
|
@ -6,7 +6,6 @@ CONFIG_NET_UDP=y
|
|||
CONFIG_NET_TCP=n
|
||||
CONFIG_NET_IPV4=n
|
||||
CONFIG_NET_BUF_LOG=y
|
||||
CONFIG_SYS_LOG_NET_BUF_LEVEL=2
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_COAP=y
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_COAP_LOG_LEVEL
|
||||
|
||||
#include <errno.h>
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
|
|
|
@ -14,9 +14,6 @@ CONFIG_DNS_SERVER1="192.0.2.2"
|
|||
CONFIG_DNS_SERVER2="192.0.2.2:5353"
|
||||
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
#CONFIG_NET_DEBUG_DNS_RESOLVE=y
|
||||
|
||||
CONFIG_NET_IPV4=y
|
||||
CONFIG_NET_IPV6=n
|
||||
|
|
|
@ -16,9 +16,6 @@ CONFIG_DNS_SERVER3="192.0.2.2:5353"
|
|||
CONFIG_DNS_SERVER4="[2001:db8::2]:5353"
|
||||
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
#CONFIG_NET_DEBUG_DNS_RESOLVE=y
|
||||
|
||||
CONFIG_NET_IPV4=y
|
||||
CONFIG_NET_IPV6=y
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_DNS_RESOLVER_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -22,7 +25,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_DNS_RESOLVE)
|
||||
#if defined(CONFIG_DNS_RESOLVER_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL LOG_LEVEL_WRN
|
||||
|
||||
#include <net/mqtt.h>
|
||||
#include <ztest.h>
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL LOG_LEVEL_WRN
|
||||
|
||||
#include <ztest.h>
|
||||
#include <net/mqtt.h>
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_NET_PKT_TX_COUNT=5
|
|||
CONFIG_NET_BUF_RX_COUNT=5
|
||||
CONFIG_NET_BUF_TX_COUNT=5
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_MGMT=y
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_MGMT_EVENT_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <tc_util.h>
|
||||
#include <errno.h>
|
||||
|
|
|
@ -8,7 +8,6 @@ CONFIG_NET_TCP=n
|
|||
CONFIG_NET_IPV4=n
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_ND=y
|
||||
|
@ -22,11 +21,3 @@ CONFIG_NET_MGMT=y
|
|||
CONFIG_NET_MGMT_EVENT=y
|
||||
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=4
|
||||
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=4
|
||||
#CONFIG_NET_DEBUG_MGMT_EVENT=y
|
||||
#CONFIG_NET_DEBUG_IF=y
|
||||
#CONFIG_NET_DEBUG_CORE=y
|
||||
#CONFIG_NET_DEBUG_IPV6=y
|
||||
#CONFIG_NET_DEBUG_ICMPV6=y
|
||||
#CONFIG_NET_DEBUG_UTILS=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
#CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_IPV6_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -29,7 +32,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_IPV6)
|
||||
#if defined(CONFIG_NET_IPV6_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
|
|
@ -9,11 +9,8 @@ CONFIG_NET_BUF_RX_COUNT=7
|
|||
CONFIG_NET_BUF_TX_COUNT=7
|
||||
CONFIG_NET_BUF_DATA_SIZE=128
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=3
|
||||
CONFIG_NET_DEBUG_IF=y
|
||||
CONFIG_NET_DEBUG_CORE=y
|
||||
CONFIG_NET_IPV6_MAX_NEIGHBORS=4
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_IPV6_NBR_CACHE_LOG_LEVEL
|
||||
|
||||
#include <ztest.h>
|
||||
#include <zephyr/types.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -3,7 +3,6 @@ CONFIG_NET_TEST=y
|
|||
CONFIG_NET_IPV6=y
|
||||
CONFIG_NET_BUF=y
|
||||
CONFIG_NET_BUF_LOG=y
|
||||
CONFIG_SYS_LOG_NET_BUF_LEVEL=2
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
||||
CONFIG_NET_PKT_RX_COUNT=4
|
||||
CONFIG_NET_PKT_TX_COUNT=4
|
||||
|
@ -13,9 +12,6 @@ CONFIG_NET_BUF_TX_COUNT=34
|
|||
# it without fixing the tests.
|
||||
CONFIG_NET_BUF_DATA_SIZE=100
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=1
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_PKT_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
@ -17,7 +20,7 @@
|
|||
#include <net/net_pkt.h>
|
||||
#include <net/net_ip.h>
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_NET_PKT)
|
||||
#if defined(CONFIG_NET_NET_PKT_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#define NET_LOG_ENABLED 1
|
||||
#else
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_NET_L2_ETHERNET=y
|
|||
CONFIG_NET_L2_ETHERNET_MGMT=y
|
||||
CONFIG_NET_PROMISCUOUS_MODE=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
@ -23,5 +22,3 @@ CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=6
|
|||
CONFIG_NET_IPV6_MAX_NEIGHBORS=1
|
||||
CONFIG_NET_IPV6_ND=n
|
||||
CONFIG_ZTEST=y
|
||||
#CONFIG_NET_DEBUG_IF=y
|
||||
#CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_IF_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -23,7 +26,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_IF)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -144,7 +147,7 @@ ETH_NET_DEVICE_INIT(eth_fake1, "eth_fake1", eth_fake_init, ð_fake_data1,
|
|||
ETH_NET_DEVICE_INIT(eth_fake2, "eth_fake2", eth_fake_init, ð_fake_data2,
|
||||
NULL, CONFIG_ETH_INIT_PRIORITY, ð_fake_api_funcs, 1500);
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_IF)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
static const char *iface2str(struct net_if *iface)
|
||||
{
|
||||
if (net_if_l2(iface) == &NET_L2_GET_NAME(ETHERNET)) {
|
||||
|
|
|
@ -7,7 +7,6 @@ CONFIG_NET_IPV4=n
|
|||
CONFIG_NET_MAX_CONTEXTS=4
|
||||
CONFIG_NET_L2_ETHERNET=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
@ -22,14 +21,6 @@ CONFIG_NET_IPV6_ND=n
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_NET_APP=n
|
||||
CONFIG_NET_CONFIG_SETTINGS=n
|
||||
CONFIG_NET_DEBUG_L2_ETHERNET=n
|
||||
CONFIG_NET_DEBUG_CONTEXT=n
|
||||
CONFIG_NET_DEBUG_IF=n
|
||||
CONFIG_NET_DEBUG_CORE=n
|
||||
CONFIG_NET_DEBUG_IPV6=n
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_NET_SHELL=n
|
||||
CONFIG_PTP_CLOCK=y
|
||||
CONFIG_ETH_NATIVE_POSIX=n
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_L2_ETHERNET_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -27,7 +30,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -252,7 +255,7 @@ struct user_data {
|
|||
int total_if_count;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
static const char *iface2str(struct net_if *iface)
|
||||
{
|
||||
#ifdef CONFIG_NET_L2_ETHERNET
|
||||
|
|
|
@ -7,7 +7,6 @@ CONFIG_NET_IPV4=n
|
|||
CONFIG_NET_MAX_CONTEXTS=4
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_ROUTE_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <ztest.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -30,7 +33,7 @@
|
|||
#include "nbr.h"
|
||||
#include "route.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_ROUTE)
|
||||
#if defined(CONFIG_NET_ROUTE_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
|
|
@ -7,7 +7,6 @@ CONFIG_NET_IPV4=n
|
|||
CONFIG_NET_MAX_CONTEXTS=4
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_ND=n
|
||||
|
@ -23,14 +22,4 @@ CONFIG_NET_RPL_MAX_DAG_PER_INSTANCE=2
|
|||
CONFIG_NET_RPL_MAX_INSTANCES=3
|
||||
CONFIG_NET_RPL_PROBING=y
|
||||
CONFIG_NET_STATISTICS_RPL=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
#CONFIG_NET_DEBUG_CONTEXT=y
|
||||
#CONFIG_NET_DEBUG_CORE=y
|
||||
#CONFIG_NET_DEBUG_UTILS=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
#CONFIG_NET_DEBUG_CONN=y
|
||||
#CONFIG_NET_DEBUG_IPV6=y
|
||||
#CONFIG_NET_DEBUG_IF=y
|
||||
#CONFIG_NET_DEBUG_UTILS=y
|
||||
#CONFIG_NET_DEBUG_RPL=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_RPL_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <ztest.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -30,7 +33,7 @@
|
|||
#include "nbr.h"
|
||||
#include "rpl.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_RPL)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -150,7 +153,7 @@ static int tester_send(struct net_if *iface, struct net_pkt *pkt)
|
|||
|
||||
DBG("pkt %p to be sent len %lu\n", pkt, net_pkt_get_len(pkt));
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_RPL)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
net_hexdump_frags("recv", pkt, false);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_SOCKETS_LOG_LEVEL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ztest_assert.h>
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_SOCKETS_LOG_LEVEL
|
||||
|
||||
#include <ztest_assert.h>
|
||||
#include <net/socket.h>
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@ CONFIG_NET_CONFIG_SETTINGS=y
|
|||
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
|
||||
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1"
|
||||
|
||||
# Network debug config
|
||||
#CONFIG_NET_LOG=y
|
||||
#CONFIG_NET_DEBUG_SOCKETS=y
|
||||
#CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
||||
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_SOCKETS_LOG_LEVEL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ztest_assert.h>
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ CONFIG_NET_BUF_RX_COUNT=20
|
|||
CONFIG_NET_BUF_TX_COUNT=20
|
||||
CONFIG_NET_MAX_CONTEXTS=20
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IF_MAX_IPV6_COUNT=2
|
||||
|
@ -29,13 +28,3 @@ CONFIG_NET_IPV6_DAD=n
|
|||
CONFIG_NET_IPV6_NBR_CACHE=n
|
||||
CONFIG_NET_IPV6_MLD=n
|
||||
CONFIG_NET_TCP_CHECKSUM=n
|
||||
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
#CONFIG_NET_DEBUG_CORE=y
|
||||
#CONFIG_NET_DEBUG_TCP=y
|
||||
#CONFIG_NET_DEBUG_IPV6=y
|
||||
#CONFIG_NET_DEBUG_CONN=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
#CONFIG_NET_DEBUG_IF=y
|
||||
#CONFIG_NET_DEBUG_CONTEXT=y
|
||||
#CONFIG_NET_DEBUG_L2=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_TCP_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
|
||||
#include <zephyr/types.h>
|
||||
|
@ -24,7 +27,7 @@
|
|||
|
||||
#include <tc_util.h>
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_TCP)
|
||||
#if defined(CONFIG_NET_TCP_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#define NET_LOG_ENABLED 1
|
||||
#else
|
||||
|
|
|
@ -10,7 +10,6 @@ CONFIG_NET_MAX_CONN=8
|
|||
CONFIG_NET_L2_ETHERNET=y
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_STATISTICS=y
|
||||
|
@ -31,13 +30,6 @@ CONFIG_NET_TC_RX_COUNT=8
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_NET_APP=n
|
||||
CONFIG_NET_CONFIG_SETTINGS=n
|
||||
CONFIG_NET_DEBUG_L2_ETHERNET=n
|
||||
CONFIG_NET_DEBUG_CONTEXT=n
|
||||
CONFIG_NET_DEBUG_IF=n
|
||||
CONFIG_NET_DEBUG_CORE=n
|
||||
CONFIG_NET_DEBUG_IPV6=n
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_NET_SHELL=n
|
||||
|
||||
# We run out of CONFIG_MAX_THREAD_BYTES in qemu. Instead of increasing that
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_TC_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -27,7 +30,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -186,7 +189,7 @@ static int eth_tx(struct net_if *iface, struct net_pkt *pkt)
|
|||
}
|
||||
|
||||
if (test_started) {
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
k_tid_t thread = k_current_get();
|
||||
#endif
|
||||
int i, prio, ret;
|
||||
|
@ -682,7 +685,7 @@ static void recv_cb(struct net_context *context,
|
|||
int status,
|
||||
void *user_data)
|
||||
{
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
k_tid_t thread = k_current_get();
|
||||
#endif
|
||||
int i, prio, ret;
|
||||
|
|
|
@ -5,7 +5,6 @@ CONFIG_NET_UDP=y
|
|||
CONFIG_NET_TCP=n
|
||||
CONFIG_NET_IPV4=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_ND=n
|
||||
|
@ -15,7 +14,5 @@ CONFIG_NET_PKT_RX_COUNT=2
|
|||
CONFIG_NET_BUF_RX_COUNT=5
|
||||
CONFIG_NET_BUF_TX_COUNT=5
|
||||
CONFIG_NET_TRICKLE=y
|
||||
#CONFIG_NET_DEBUG_TRICKLE=y
|
||||
#CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_ZTEST=y
|
||||
CONFIG_ZTEST_STACKSIZE=1024
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_TRICKLE_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <ztest.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -25,7 +28,7 @@
|
|||
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_TRICKLE)
|
||||
#if defined(CONFIG_NET_TRICKLE_LOG_LEVEL_DBG)
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
|
|
@ -7,7 +7,6 @@ CONFIG_NET_IPV4=n
|
|||
CONFIG_NET_MAX_CONTEXTS=4
|
||||
CONFIG_NET_L2_ETHERNET=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
@ -22,12 +21,5 @@ CONFIG_NET_IPV6_ND=n
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_NET_APP=n
|
||||
CONFIG_NET_CONFIG_SETTINGS=n
|
||||
CONFIG_NET_DEBUG_L2_ETHERNET=n
|
||||
CONFIG_NET_DEBUG_CONTEXT=n
|
||||
CONFIG_NET_DEBUG_IF=n
|
||||
CONFIG_NET_DEBUG_CORE=n
|
||||
CONFIG_NET_DEBUG_IPV6=n
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_NET_SHELL=n
|
||||
CONFIG_NET_PKT_TIMESTAMP=y
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_L2_ETHERNET_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -27,7 +30,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -302,7 +305,7 @@ struct user_data {
|
|||
int total_if_count;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
static const char *iface2str(struct net_if *iface)
|
||||
{
|
||||
#ifdef CONFIG_NET_L2_ETHERNET
|
||||
|
|
|
@ -15,16 +15,10 @@ CONFIG_NET_PKT_TX_COUNT=10
|
|||
CONFIG_NET_BUF_RX_COUNT=15
|
||||
CONFIG_NET_BUF_TX_COUNT=15
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=2
|
||||
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=2
|
||||
CONFIG_NET_DEBUG_CORE=y
|
||||
CONFIG_NET_DEBUG_CONN=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
#CONFIG_NET_DEBUG_IF=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
|
||||
# Turn off UDP checksum checking as the test fails otherwise.
|
||||
CONFIG_NET_UDP_CHECKSUM=n
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_UDP_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <linker/sections.h>
|
||||
|
||||
|
@ -26,7 +29,7 @@
|
|||
|
||||
#include <ztest.h>
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_UDP)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -34,7 +37,7 @@
|
|||
|
||||
#include "udp_internal.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_UDP)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define NET_LOG_ENABLED 1
|
||||
#endif
|
||||
#include "net_private.h"
|
||||
|
|
|
@ -9,12 +9,11 @@ CONFIG_NET_PKT_TX_COUNT=2
|
|||
CONFIG_NET_BUF_RX_COUNT=7
|
||||
CONFIG_NET_BUF_TX_COUNT=7
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
|
||||
CONFIG_NET_DEBUG_UTILS=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_ZTEST=y
|
||||
CONFIG_MAIN_STACK_SIZE=1280
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_UTILS_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -8,7 +8,6 @@ CONFIG_NET_MAX_CONTEXTS=4
|
|||
CONFIG_NET_L2_ETHERNET=y
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NET_IPV6_DAD=n
|
||||
|
@ -26,13 +25,6 @@ CONFIG_NET_CONTEXT_PRIORITY=y
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_NET_APP=n
|
||||
CONFIG_NET_CONFIG_SETTINGS=n
|
||||
CONFIG_NET_DEBUG_L2_ETHERNET=n
|
||||
CONFIG_NET_DEBUG_CONTEXT=n
|
||||
CONFIG_NET_DEBUG_IF=n
|
||||
CONFIG_NET_DEBUG_CORE=n
|
||||
CONFIG_NET_DEBUG_IPV6=n
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_NET_SHELL=n
|
||||
|
||||
# Disable internal ethernet drivers as the test is self contained
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_NET_L2_ETHERNET_LOG_LEVEL
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -27,7 +30,7 @@
|
|||
#define NET_LOG_ENABLED 1
|
||||
#include "net_private.h"
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...)
|
||||
|
@ -274,7 +277,7 @@ struct user_data {
|
|||
int total_if_count;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_L2_ETHERNET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
static const char *iface2str(struct net_if *iface)
|
||||
{
|
||||
#ifdef CONFIG_NET_L2_ETHERNET
|
||||
|
|
|
@ -56,18 +56,4 @@ CONFIG_MBEDTLS_BUILTIN=y
|
|||
|
||||
# Logging
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
CONFIG_NET_STATISTICS=y
|
||||
|
||||
# Debugging
|
||||
CONFIG_NET_DEBUG_WEBSOCKET=n
|
||||
CONFIG_NET_DEBUG_HTTP=n
|
||||
CONFIG_NET_DEBUG_APP=n
|
||||
CONFIG_NET_DEBUG_NET_PKT=n
|
||||
CONFIG_NET_DEBUG_CORE=n
|
||||
CONFIG_NET_DEBUG_CONTEXT=n
|
||||
CONFIG_NET_DEBUG_CONN=n
|
||||
CONFIG_NET_DEBUG_TCP=n
|
||||
CONFIG_NET_DEBUG_IF=n
|
||||
CONFIG_NET_DEBUG_IPV6=n
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
* we get proper data back.
|
||||
*/
|
||||
|
||||
#define LOG_MODULE_NAME net_test
|
||||
#define NET_LOG_LEVEL CONFIG_WEBSOCKET_LOG_LEVEL
|
||||
|
||||
#include <ztest.h>
|
||||
|
||||
#include <net/net_ip.h>
|
||||
|
@ -20,7 +23,7 @@
|
|||
static struct net_app_ctx app_ctx_v6;
|
||||
static struct net_app_ctx app_ctx_v4;
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_WEBSOCKET)
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
#define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#define NET_LOG_ENABLED 1
|
||||
#else
|
||||
|
@ -217,7 +220,7 @@ static void test_send_recv(int chunk_size, struct net_app_ctx *ctx)
|
|||
|
||||
for (i = 0; i < sizeof(ws_test_msg); i += chunk_size) {
|
||||
for (j = 0;
|
||||
IS_ENABLED(CONFIG_NET_DEBUG_WEBSOCKET) && j < chunk_size;
|
||||
(NET_LOG_LEVEL >= LOG_LEVEL_DBG) && j < chunk_size;
|
||||
j++) {
|
||||
if ((i + chunk_size) >= sizeof(ws_test_msg)) {
|
||||
break;
|
||||
|
@ -276,7 +279,7 @@ static void test_send_multi_msg(struct net_app_ctx *ctx)
|
|||
|
||||
for (i = 0; i < sizeof(ws_big_msg); i += chunk_size) {
|
||||
for (j = 0;
|
||||
IS_ENABLED(CONFIG_NET_DEBUG_WEBSOCKET) && j < chunk_size;
|
||||
(NET_LOG_LEVEL >= LOG_LEVEL_DBG) && j < chunk_size;
|
||||
j++) {
|
||||
int first_msg = 0;
|
||||
|
||||
|
|
|
@ -4,11 +4,8 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_WEBSOCKET)
|
||||
#define SYS_LOG_DOMAIN "test-ws-server"
|
||||
#define NET_SYS_LOG_LEVEL SYS_LOG_LEVEL_DEBUG
|
||||
#define NET_LOG_ENABLED 1
|
||||
#endif
|
||||
#define LOG_MODULE_NAME net_test_websocket
|
||||
#define NET_LOG_LEVEL CONFIG_WEBSOCKET_LOG_LEVEL
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <errno.h>
|
||||
|
@ -240,7 +237,6 @@ static void ws_closed(struct http_ctx *ctx,
|
|||
NET_DBG("Connection %p closed", ctx);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NET_DEBUG_WEBSOCKET) && (NET_SYS_LOG_LEVEL > 3)
|
||||
static const char *get_string(int str_len, const char *str)
|
||||
{
|
||||
static char buf[64];
|
||||
|
@ -251,7 +247,6 @@ static const char *get_string(int str_len, const char *str)
|
|||
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
||||
static enum http_verdict default_handler(struct http_ctx *ctx,
|
||||
enum http_connection_type type,
|
||||
|
|
Loading…
Reference in a new issue