Skip to content

Commit

Permalink
tests: net: lib: downloader: Don't enable POSIX APIs for the test
Browse files Browse the repository at this point in the history
... because this causes conflicting types compilation errors in library
files it uses.

Signed-off-by: Andrzej Głąbek <[email protected]>
  • Loading branch information
anangl committed Feb 6, 2025
1 parent 03917b2 commit cef2ee0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion tests/subsys/net/lib/downloader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ target_compile_options(app
-DCONFIG_DOWNLOADER_MAX_FILENAME_SIZE=256
-DCONFIG_DOWNLOADER_TRANSPORT_PARAMS_SIZE=256
-DCONFIG_DOWNLOADER_STACK_SIZE=2048
-DCONFIG_POSIX_API=y
-DCONFIG_NET_IPV6=y
-DCONFIG_NET_IPV4=y
-DCONFIG_COAP_MAX_RETRANSMIT=2
Expand Down
8 changes: 4 additions & 4 deletions tests/subsys/net/lib/downloader/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ int zsock_getaddrinfo_server_ok(const char *host, const char *service,
}

errno = ENOPROTOOPT;
return EAI_SYSTEM;
return DNS_EAI_SYSTEM;
}

int zsock_getaddrinfo_server2_ok(const char *host, const char *service,
Expand All @@ -309,7 +309,7 @@ int zsock_getaddrinfo_server2_ok(const char *host, const char *service,
}

errno = ENOPROTOOPT;
return EAI_SYSTEM;
return DNS_EAI_SYSTEM;
}


Expand All @@ -320,7 +320,7 @@ int zsock_getaddrinfo_server_ipv6_fail_ipv4_ok(const char *host, const char *ser
if (hints->ai_family == AF_INET6) {
/* Fail on IPv6 to retry IPv4 */
errno = ENOPROTOOPT;
return EAI_SYSTEM;
return DNS_EAI_SYSTEM;
}

TEST_ASSERT_EQUAL_STRING(HOSTNAME, host);
Expand All @@ -335,7 +335,7 @@ int zsock_getaddrinfo_server_enetunreach(const char *host, const char *service,
struct zsock_addrinfo **res)
{
errno = ENETUNREACH;
return EAI_SYSTEM;
return DNS_EAI_SYSTEM;
}

void zsock_freeaddrinfo_server_ipv4(struct zsock_addrinfo *addr)
Expand Down

0 comments on commit cef2ee0

Please sign in to comment.