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 <m.niestroj@emb.dev>
This commit is contained in:
Marcin Niestroj 2024-05-03 11:29:00 +02:00 committed by Carles Cufí
commit 3a9ae1878f

View file

@ -343,7 +343,7 @@ ZTEST(net_socket_udp, test_07_so_priority)
sizeof(optval));
zassert_equal(rv, 0, "setsockopt failed (%d)", errno);
optval = 8;
optval = 6;
rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_PRIORITY, &optval,
sizeof(optval));
zassert_equal(rv, 0, "setsockopt failed");