Skip to content

Commit

Permalink
tests/samples: net: Fix the max number of file descriptors
Browse files Browse the repository at this point in the history
Make sure that CONFIG_ZVFS_OPEN_MAX in the tests and samples is at
least the same value as CONFIG_NET_SOCKETS_POLL_MAX so that we
cannot have more polled sockets than there are available file
descriptors.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
  • Loading branch information
jukkar committed Sep 27, 2024
1 parent 15beccb commit cd5c62a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions samples/net/sockets/echo_service/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CONFIG_ZVFS_OPEN_MAX=10
CONFIG_NET_MAX_CONN=5
CONFIG_NET_SOCKETS_SERVICE=y
CONFIG_NET_SOCKETS_POLL_MAX=20
CONFIG_ZVFS_OPEN_MAX=20

# Network driver config
CONFIG_TEST_RANDOM_GENERATOR=y
Expand Down
1 change: 1 addition & 0 deletions tests/net/all/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS_PACKET=y
CONFIG_NET_SOCKETS_POLL_MAX=50
CONFIG_ZVFS_OPEN_MAX=50
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
CONFIG_NET_SOCKETS_TLS_MAX_CIPHERSUITES=10
Expand Down
1 change: 1 addition & 0 deletions tests/net/lib/dns_addremove/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ CONFIG_PRINTK=y
CONFIG_ZTEST=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_NET_SOCKETS_POLL_MAX=5
CONFIG_ZVFS_OPEN_MAX=5
2 changes: 1 addition & 1 deletion tests/net/lib/dns_resolve/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ CONFIG_ZTEST=y

CONFIG_MAIN_STACK_SIZE=1344
CONFIG_NET_SOCKETS_POLL_MAX=9
CONFIG_ZVFS_OPEN_MAX=8
CONFIG_ZVFS_OPEN_MAX=9
1 change: 1 addition & 0 deletions tests/net/lib/mdns_responder/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CONFIG_NET_LOOPBACK=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=y
CONFIG_NET_SOCKETS_POLL_MAX=7
CONFIG_ZVFS_OPEN_MAX=7

# Network driver config
CONFIG_TEST_RANDOM_GENERATOR=y
Expand Down
2 changes: 1 addition & 1 deletion tests/net/pm/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONFIG_NET_L2_ETHERNET=n
CONFIG_NET_UDP=y
CONFIG_NET_IPV4=y
CONFIG_NET_SOCKETS=y
CONFIG_ZVFS_OPEN_MAX=2
CONFIG_ZVFS_OPEN_MAX=3
CONFIG_ZTEST_STACK_SIZE=2048
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_NET_LOG=y
Expand Down
2 changes: 1 addition & 1 deletion tests/net/socket/service/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_NET_IPV6=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_SOCKETS=y
CONFIG_ZVFS_OPEN_MAX=10
CONFIG_ZVFS_OPEN_MAX=20
CONFIG_NET_PKT_TX_COUNT=8
CONFIG_NET_PKT_RX_COUNT=8
CONFIG_NET_MAX_CONN=5
Expand Down

0 comments on commit cd5c62a

Please sign in to comment.