Skip to content

Commit c355fb1

Browse files
committed
Restricting IPV4 echo tests to chars 0-9.
Having the echo tests generate any random character caused issues serializing the test output into an xml file. This change limits the characters generated by the device to '0' - '9'.
1 parent 5f43f18 commit c355fb1

File tree

2 files changed

+2
-2
lines changed
  • features/net/FEATURE_IPV4/TESTS/mbedmicro-net

2 files changed

+2
-2
lines changed

features/net/FEATURE_IPV4/TESTS/mbedmicro-net/tcp_client_echo/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace {
2121

2222
void prep_buffer(char *tx_buffer, size_t tx_size) {
2323
for (size_t i=0; i<tx_size; ++i) {
24-
tx_buffer[i] = (rand() % ASCII_MAX) + ' ' + 1;
24+
tx_buffer[i] = (rand() % 10) + '0';
2525
}
2626
}
2727

features/net/FEATURE_IPV4/TESTS/mbedmicro-net/udp_echo_client/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace {
2020

2121
void prep_buffer(char *tx_buffer, size_t tx_size) {
2222
for (size_t i=0; i<tx_size; ++i) {
23-
tx_buffer[i] = (rand() % ASCII_MAX) + ' ' + 1;
23+
tx_buffer[i] = (rand() % 10) + '0';
2424
}
2525
}
2626

0 commit comments

Comments
 (0)