CI: Improve common test methods

also fix ota test cases
This commit is contained in:
Chen Yudong
2022-07-07 00:34:06 +08:00
parent 692fbc169c
commit 2f75733ad7
46 changed files with 700 additions and 684 deletions

View File

@@ -71,6 +71,11 @@ static void udp_server_task(void *pvParameters)
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt));
}
#endif
// Set timeout
struct timeval timeout;
timeout.tv_sec = 10;
timeout.tv_usec = 0;
setsockopt (sock, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout);
int err = bind(sock, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
if (err < 0) {