Skip to content

Commit 6e629e1

Browse files
Gemalto Crinterion UDP test adjustments
Adjusting the tests to match the cellular modems ELS61-E2 and BGS2-W requirements.
1 parent aff2bee commit 6e629e1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

TESTS/netsocket/udp/udpsocket_echotest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ void udpsocket_echotest_nonblock_receiver(void *receive_bytes)
109109
wait_ms(WAIT2RECV_TIMEOUT);
110110
--retry_cnt;
111111
continue;
112+
} else if (recvd < 0) {
113+
printf("sock.recvfrom returned %d\n", recvd);
114+
TEST_FAIL();
115+
break;
112116
} else if (recvd == expt2recv) {
113117
break;
114118
}

TESTS/netsocket/udp/udpsocket_sendto_timeout.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ void UDPSOCKET_SENDTO_TIMEOUT()
4343
TEST_ASSERT_EQUAL(sizeof(tx_buffer), sent);
4444
TEST_ASSERT(timer.read_ms() <= 100);
4545

46+
sock.set_timeout(1000);
47+
4648
timer.reset();
4749
timer.start();
4850
sent = sock.sendto(udp_addr, tx_buffer, sizeof(tx_buffer));
4951
timer.stop();
5052
TEST_ASSERT_EQUAL(sizeof(tx_buffer), sent);
51-
TEST_ASSERT(timer.read_ms() <= 100);
53+
TEST_ASSERT(timer.read_ms() <= 1000);
5254
printf("MBED: Time taken: %fs\n", timer.read());
5355

5456
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());

0 commit comments

Comments
 (0)