diff --git a/samples/net/sockets/big_http_download/sample.yaml b/samples/net/sockets/big_http_download/sample.yaml index 96d303dbe24..1f329977f36 100644 --- a/samples/net/sockets/big_http_download/sample.yaml +++ b/samples/net/sockets/big_http_download/sample.yaml @@ -1,10 +1,18 @@ sample: description: BSD Sockets big HTTP download example name: big_http_download +common: + filter: TOOLCHAIN_HAS_NEWLIB == 1 + harness: net + min_ram: 32 + min_flash: 128 + tags: net socket tests: sample.net.sockets.big_http_download: - filter: TOOLCHAIN_HAS_NEWLIB == 1 - harness: net - min_ram: 32 - min_flash: 128 - tags: net socket + extra_configs: + - CONFIG_NET_SOCKETS_POSIX_NAMES=y + sample.net.sockets.big_http_download.posix: + filter: and not CONFIG_NET_SOCKETS_OFFLOAD + extra_configs: + - CONFIG_NET_SOCKETS_POSIX_NAMES=n + - CONFIG_POSIX_API=y diff --git a/samples/net/sockets/big_http_download/src/big_http_download.c b/samples/net/sockets/big_http_download/src/big_http_download.c index 6991d99347a..614ed37a935 100644 --- a/samples/net/sockets/big_http_download/src/big_http_download.c +++ b/samples/net/sockets/big_http_download/src/big_http_download.c @@ -11,7 +11,7 @@ #include "mbedtls/md.h" -#ifndef __ZEPHYR__ +#if !defined(__ZEPHYR__) || defined(CONFIG_POSIX_API) #include #include diff --git a/samples/net/sockets/dumb_http_server/sample.yaml b/samples/net/sockets/dumb_http_server/sample.yaml index a8a01023b99..0c558712d8c 100644 --- a/samples/net/sockets/dumb_http_server/sample.yaml +++ b/samples/net/sockets/dumb_http_server/sample.yaml @@ -1,10 +1,18 @@ sample: description: BSD Sockets API dumb HTTP server example name: socket_dumb_http_server +common: + filter: TOOLCHAIN_HAS_NEWLIB == 1 + harness: net + min_ram: 32 + min_flash: 96 + tags: net socket tests: sample.net.sockets.dumb_http_server: - filter: TOOLCHAIN_HAS_NEWLIB == 1 - harness: net - min_ram: 32 - min_flash: 96 - tags: net socket + extra_configs: + - CONFIG_NET_SOCKETS_POSIX_NAMES=y + sample.net.sockets.dumb_http_server.posix: + filter: and not CONFIG_NET_SOCKETS_OFFLOAD + extra_configs: + - CONFIG_NET_SOCKETS_POSIX_NAMES=n + - CONFIG_POSIX_API=y diff --git a/samples/net/sockets/dumb_http_server/src/socket_dumb_http.c b/samples/net/sockets/dumb_http_server/src/socket_dumb_http.c index 412612eea00..1fdfcf7e162 100644 --- a/samples/net/sockets/dumb_http_server/src/socket_dumb_http.c +++ b/samples/net/sockets/dumb_http_server/src/socket_dumb_http.c @@ -8,7 +8,7 @@ #include #include -#ifndef __ZEPHYR__ +#if !defined(__ZEPHYR__) || defined(CONFIG_POSIX_API) #include #include diff --git a/samples/net/sockets/echo_async/sample.yaml b/samples/net/sockets/echo_async/sample.yaml index b2a0befe931..21d5d8d9d62 100644 --- a/samples/net/sockets/echo_async/sample.yaml +++ b/samples/net/sockets/echo_async/sample.yaml @@ -2,8 +2,17 @@ sample: description: BSD Sockets API TCP echo server sample using non-blocking sockets name: socket_echo_async +common: + filter: TOOLCHAIN_HAS_NEWLIB == 1 + harness: net + platform_whitelist: qemu_x86 + tags: net socket tests: sample.net.sockets.echo_async: - harness: net - platform_whitelist: qemu_x86 - tags: net socket + extra_configs: + - CONFIG_NET_SOCKETS_POSIX_NAMES=y + sample.net.sockets.echo_async.posix: + filter: and not CONFIG_NET_SOCKETS_OFFLOAD + extra_configs: + - CONFIG_NET_SOCKETS_POSIX_NAMES=n + - CONFIG_POSIX_API=y diff --git a/samples/net/sockets/echo_async/src/socket_echo.c b/samples/net/sockets/echo_async/src/socket_echo.c index 6555e965fb6..bb4f6b609cb 100644 --- a/samples/net/sockets/echo_async/src/socket_echo.c +++ b/samples/net/sockets/echo_async/src/socket_echo.c @@ -9,7 +9,7 @@ #include #include -#ifndef __ZEPHYR__ +#if !defined(__ZEPHYR__) || defined(CONFIG_POSIX_API) #include #include diff --git a/samples/net/sockets/echo_async_select/src/socket_echo_select.c b/samples/net/sockets/echo_async_select/src/socket_echo_select.c index 713c8803f54..a4a7028e176 100644 --- a/samples/net/sockets/echo_async_select/src/socket_echo_select.c +++ b/samples/net/sockets/echo_async_select/src/socket_echo_select.c @@ -9,10 +9,11 @@ #include #include -#ifndef __ZEPHYR__ +#if !defined(__ZEPHYR__) || defined(CONFIG_POSIX_API) #include #include +#include #include #include #include diff --git a/samples/net/sockets/http_get/sample.yaml b/samples/net/sockets/http_get/sample.yaml index cc4720b5943..9a4b71cde6d 100644 --- a/samples/net/sockets/http_get/sample.yaml +++ b/samples/net/sockets/http_get/sample.yaml @@ -1,10 +1,21 @@ sample: description: BSD Sockets API HTTP GET example name: socket_http_get +common: + filter: TOOLCHAIN_HAS_NEWLIB == 1 + harness: net + min_ram: 32 + min_flash: 80 + tags: net socket tests: sample.net.sockets.http_get: - filter: TOOLCHAIN_HAS_NEWLIB == 1 - harness: net - min_ram: 32 - min_flash: 80 - tags: net socket + extra_configs: + - CONFIG_NET_SOCKETS_POSIX_NAMES=y + # Forcibly defines CONFIG_POSIX_API, which is incompatible with + # CONFIG_NET_SOCKETS_POSIX_NAMES. + platform_exclude: cc3220sf_launchxl + sample.net.sockets.http_get.posix: + filter: and not CONFIG_NET_SOCKETS_OFFLOAD + extra_configs: + - CONFIG_NET_SOCKETS_POSIX_NAMES=n + - CONFIG_POSIX_API=y diff --git a/samples/net/sockets/http_get/src/http_get.c b/samples/net/sockets/http_get/src/http_get.c index 4c2ebd29629..5db0548785d 100644 --- a/samples/net/sockets/http_get/src/http_get.c +++ b/samples/net/sockets/http_get/src/http_get.c @@ -7,7 +7,7 @@ #include #include -#ifndef __ZEPHYR__ +#if !defined(__ZEPHYR__) || defined(CONFIG_POSIX_API) #include #include