Skip to content

Commit 3a9ae18

Browse files
mniestrojcarlescufi
authored andcommitted
tests: socket: udp: reduce SO_PRIORITY from 8 to 6 for NSOS compatbility
According to 'man 7 socket' about SO_PRIORITY: Setting a priority outside the range 0 to 6 requires the CAP_NET_ADMIN capability. So use 6 instead of 8, in order to make UDP socket tests pass with native offloaded sockets on native_sim platform. Signed-off-by: Marcin Niestroj <[email protected]>
1 parent 87a6df2 commit 3a9ae18

File tree

1 file changed

+1
-1
lines changed
  • tests/net/socket/udp/src

1 file changed

+1
-1
lines changed

tests/net/socket/udp/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ ZTEST(net_socket_udp, test_07_so_priority)
343343
sizeof(optval));
344344
zassert_equal(rv, 0, "setsockopt failed (%d)", errno);
345345

346-
optval = 8;
346+
optval = 6;
347347
rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_PRIORITY, &optval,
348348
sizeof(optval));
349349
zassert_equal(rv, 0, "setsockopt failed");

0 commit comments

Comments
 (0)