Skip to content

Commit b3b82a4

Browse files
author
Chris Trowbridge
committed
Replace calls to printf() with new wrapper function print_to_console()
1 parent c93c181 commit b3b82a4

22 files changed

+112
-76
lines changed

TESTS/netsocket/dns/asynchronous_dns_cache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ void ASYNCHRONOUS_DNS_CACHE()
5858
int delay_ms = (ticker_us - started_us) / 1000;
5959

6060
static int delay_first = delay_ms / 2;
61-
printf("Delays: first: %i, delay_ms: %i\n", delay_first, delay_ms);
61+
print_to_console("Delays: first: %i, delay_ms: %i\n", delay_first, delay_ms);
6262
// Check that cached accesses are at least twice as fast as the first one
6363
TEST_ASSERT_TRUE(i == 0 || delay_ms <= delay_first);
6464

65-
printf("DNS: query \"%s\" => \"%s\", time %i ms\n",
65+
print_to_console("DNS: query \"%s\" => \"%s\", time %i ms\n",
6666
dns_test_hosts[0], data.addr.get_ip_address(), delay_ms);
6767
}
6868
}

TESTS/netsocket/dns/asynchronous_dns_cancel.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void ASYNCHRONOUS_DNS_CANCEL()
4343
count++;
4444
} else {
4545
// No memory to initiate DNS query, callback will not be called
46-
printf("Error: No resources to initiate DNS query for %s\n", dns_test_hosts[i]);
46+
print_to_console("Error: No resources to initiate DNS query for %s\n", dns_test_hosts[i]);
4747
data[i].result = data[i].req_result;
4848
data[i].value_set = true;
4949
}
@@ -64,21 +64,21 @@ void ASYNCHRONOUS_DNS_CANCEL()
6464

6565
for (unsigned int i = 0; i < MBED_CONF_APP_DNS_TEST_HOSTS_NUM; i++) {
6666
if (!data[i].value_set) {
67-
printf("DNS: query \"%s\" => cancel\n", dns_test_hosts[i]);
67+
print_to_console("DNS: query \"%s\" => cancel\n", dns_test_hosts[i]);
6868
continue;
6969
}
7070
TEST_ASSERT(data[i].result == NSAPI_ERROR_OK || data[i].result == NSAPI_ERROR_NO_MEMORY || data[i].result == NSAPI_ERROR_BUSY || data[i].result == NSAPI_ERROR_DNS_FAILURE || data[i].result == NSAPI_ERROR_TIMEOUT);
7171
if (data[i].result == NSAPI_ERROR_OK) {
72-
printf("DNS: query \"%s\" => \"%s\"\n",
72+
print_to_console("DNS: query \"%s\" => \"%s\"\n",
7373
dns_test_hosts[i], data[i].addr.get_ip_address());
7474
} else if (data[i].result == NSAPI_ERROR_DNS_FAILURE) {
75-
printf("DNS: query \"%s\" => DNS failure\n", dns_test_hosts[i]);
75+
print_to_console("DNS: query \"%s\" => DNS failure\n", dns_test_hosts[i]);
7676
} else if (data[i].result == NSAPI_ERROR_TIMEOUT) {
77-
printf("DNS: query \"%s\" => timeout\n", dns_test_hosts[i]);
77+
print_to_console("DNS: query \"%s\" => timeout\n", dns_test_hosts[i]);
7878
} else if (data[i].result == NSAPI_ERROR_NO_MEMORY) {
79-
printf("DNS: query \"%s\" => no memory\n", dns_test_hosts[i]);
79+
print_to_console("DNS: query \"%s\" => no memory\n", dns_test_hosts[i]);
8080
} else if (data[i].result == NSAPI_ERROR_BUSY) {
81-
printf("DNS: query \"%s\" => busy\n", dns_test_hosts[i]);
81+
print_to_console("DNS: query \"%s\" => busy\n", dns_test_hosts[i]);
8282
}
8383
}
8484

TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC()
3939
for (unsigned int i = 0; i < MBED_CONF_APP_DNS_TEST_HOSTS_NUM; i++) {
4040
SocketAddress addr;
4141
int err = get_interface()->gethostbyname(dns_test_hosts[i], &addr);
42-
printf("DNS: query \"%s\" => \"%s\"\n",
42+
print_to_console("DNS: query \"%s\" => \"%s\"\n",
4343
dns_test_hosts[i], addr.get_ip_address());
4444

4545
TEST_ASSERT_EQUAL(0, err);
@@ -51,7 +51,7 @@ void ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC()
5151

5252
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, data.result);
5353

54-
printf("DNS: query \"%s\" => \"%s\"\n",
54+
print_to_console("DNS: query \"%s\" => \"%s\"\n",
5555
dns_test_hosts_second[0], data.addr.get_ip_address());
5656

5757
TEST_ASSERT(strlen(data.addr.get_ip_address()) > 1);

TESTS/netsocket/dns/dns_tests.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ NetworkInterface *get_interface();
6666
void hostbyname_cb(void *data, nsapi_error_t result, SocketAddress *address);
6767
void do_asynchronous_gethostbyname(const char hosts[][DNS_TEST_HOST_LEN], unsigned int op_count, int *exp_ok, int *exp_no_mem, int *exp_dns_failure, int *exp_timeout);
6868
void do_gethostbyname(const char hosts[][DNS_TEST_HOST_LEN], unsigned int op_count, int *exp_ok, int *exp_no_mem, int *exp_dns_failure, int *exp_timeout);
69+
void print_to_console(const char* fmt, ...);
6970

7071
namespace dns_global {
7172
#ifdef MBED_GREENTEA_TEST_DNSSOCKET_TIMEOUT_S

TESTS/netsocket/dns/main.cpp

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ NetworkInterface *net;
3838
const char dns_test_hosts[MBED_CONF_APP_DNS_TEST_HOSTS_NUM][DNS_TEST_HOST_LEN] = MBED_CONF_APP_DNS_TEST_HOSTS;
3939
const char dns_test_hosts_second[MBED_CONF_APP_DNS_TEST_HOSTS_NUM][DNS_TEST_HOST_LEN] = MBED_CONF_APP_DNS_TEST_HOSTS_SECOND;
4040

41+
// Printing utility function
42+
void print_to_console(const char* fmt, ...)
43+
{
44+
#if !MBED_CONF_APP_DISABLE_LOGGING
45+
va_list args;
46+
va_start(args, fmt);
47+
vprintf(fmt, args);
48+
va_end(args);
49+
#endif
50+
}
51+
4152
// Callback used for asynchronous DNS result
4253
void hostbyname_cb(void *data, nsapi_error_t result, SocketAddress *address)
4354
{
@@ -90,20 +101,20 @@ void do_asynchronous_gethostbyname(const char hosts[][DNS_TEST_HOST_LEN], unsign
90101
TEST_ASSERT(data[i].result == NSAPI_ERROR_OK || data[i].result == NSAPI_ERROR_NO_MEMORY || data[i].result == NSAPI_ERROR_BUSY || data[i].result == NSAPI_ERROR_DNS_FAILURE || data[i].result == NSAPI_ERROR_TIMEOUT);
91102
if (data[i].result == NSAPI_ERROR_OK) {
92103
(*exp_ok)++;
93-
printf("DNS: query \"%s\" => \"%s\"\n",
104+
print_to_console("DNS: query \"%s\" => \"%s\"\n",
94105
hosts[i], data[i].addr.get_ip_address());
95106
} else if (data[i].result == NSAPI_ERROR_DNS_FAILURE) {
96107
(*exp_dns_failure)++;
97-
printf("DNS: query \"%s\" => DNS failure\n", hosts[i]);
108+
print_to_console("DNS: query \"%s\" => DNS failure\n", hosts[i]);
98109
} else if (data[i].result == NSAPI_ERROR_TIMEOUT) {
99110
(*exp_timeout)++;
100-
printf("DNS: query \"%s\" => timeout\n", hosts[i]);
111+
print_to_console("DNS: query \"%s\" => timeout\n", hosts[i]);
101112
} else if (data[i].result == NSAPI_ERROR_NO_MEMORY) {
102113
(*exp_no_mem)++;
103-
printf("DNS: query \"%s\" => no memory\n", hosts[i]);
114+
print_to_console("DNS: query \"%s\" => no memory\n", hosts[i]);
104115
} else if (data[i].result == NSAPI_ERROR_BUSY) {
105116
(*exp_no_mem)++;
106-
printf("DNS: query \"%s\" => busy\n", hosts[i]);
117+
print_to_console("DNS: query \"%s\" => busy\n", hosts[i]);
107118
}
108119
}
109120

@@ -127,22 +138,22 @@ void do_gethostbyname(const char hosts[][DNS_TEST_HOST_LEN], unsigned int op_cou
127138

128139
if (err == NSAPI_ERROR_OK) {
129140
(*exp_ok)++;
130-
printf("DNS: query \"%s\" => \"%s\"\n",
141+
print_to_console("DNS: query \"%s\" => \"%s\"\n",
131142
hosts[i], address.get_ip_address());
132143
} else if (err == NSAPI_ERROR_DNS_FAILURE) {
133144
(*exp_dns_failure)++;
134-
printf("DNS: query \"%s\" => DNS failure\n", hosts[i]);
145+
print_to_console("DNS: query \"%s\" => DNS failure\n", hosts[i]);
135146
} else if (err == NSAPI_ERROR_TIMEOUT) {
136147
(*exp_timeout)++;
137-
printf("DNS: query \"%s\" => timeout\n", hosts[i]);
148+
print_to_console("DNS: query \"%s\" => timeout\n", hosts[i]);
138149
} else if (err == NSAPI_ERROR_NO_MEMORY) {
139150
(*exp_no_mem)++;
140-
printf("DNS: query \"%s\" => no memory\n", hosts[i]);
151+
print_to_console("DNS: query \"%s\" => no memory\n", hosts[i]);
141152
} else if (err == NSAPI_ERROR_BUSY) {
142153
(*exp_no_mem)++;
143-
printf("DNS: query \"%s\" => busy\n", hosts[i]);
154+
print_to_console("DNS: query \"%s\" => busy\n", hosts[i]);
144155
} else {
145-
printf("DNS: query \"%s\" => %d, unexpected answer\n", hosts[i], err);
156+
print_to_console("DNS: query \"%s\" => %d, unexpected answer\n", hosts[i], err);
146157
TEST_ASSERT(err == NSAPI_ERROR_OK || err == NSAPI_ERROR_NO_MEMORY || err == NSAPI_ERROR_BUSY || err == NSAPI_ERROR_DNS_FAILURE || err == NSAPI_ERROR_TIMEOUT);
147158
}
148159
}
@@ -161,13 +172,13 @@ static void net_bringup()
161172
net = NetworkInterface::get_default_instance();
162173
nsapi_error_t err = net->connect();
163174
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
164-
printf("MBED: IP address is '%s'\n", net->get_ip_address() ? net->get_ip_address() : "null");
175+
print_to_console("MBED: IP address is '%s'\n", net->get_ip_address() ? net->get_ip_address() : "null");
165176
}
166177

167178
static void net_bringdown()
168179
{
169180
NetworkInterface::get_default_instance()->disconnect();
170-
printf("MBED: ifdown\n");
181+
print_to_console("MBED: ifdown\n");
171182
}
172183

173184
// Test setup

TESTS/netsocket/dns/synchronous_dns_cache.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void SYNCHRONOUS_DNS_CACHE()
5050
// Check that cached accesses are at least twice as fast as the first one
5151
TEST_ASSERT_TRUE(i == 0 || delay_ms <= delay_first);
5252

53-
printf("DNS: query \"%s\" => \"%s\", time %i ms\n",
53+
print_to_console("DNS: query \"%s\" => \"%s\", time %i ms\n",
5454
dns_test_hosts[0], address.get_ip_address(), delay_ms);
5555
}
5656
}

TESTS/netsocket/tcp/main.cpp

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ namespace {
3838
Timer tc_bucket; // Timer to limit a test cases run time
3939
}
4040

41+
// Printing utility function
42+
void print_to_console(const char* fmt, ...)
43+
{
44+
#if !MBED_CONF_APP_DISABLE_LOGGING
45+
va_list args;
46+
va_start(args, fmt);
47+
vprintf(fmt, args);
48+
va_end(args);
49+
#endif
50+
}
51+
4152
#if MBED_CONF_NSAPI_SOCKET_STATS_ENABLED
4253
mbed_stats_socket_t tcp_stats[MBED_CONF_NSAPI_SOCKET_STATS_MAX_COUNT];
4354
#endif
@@ -72,13 +83,13 @@ static void _ifup()
7283
NetworkInterface *net = NetworkInterface::get_default_instance();
7384
nsapi_error_t err = net->connect();
7485
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
75-
printf("MBED: TCPClient IP address is '%s'\n", net->get_ip_address() ? net->get_ip_address() : "null");
86+
print_to_console("MBED: TCPClient IP address is '%s'\n", net->get_ip_address() ? net->get_ip_address() : "null");
7687
}
7788

7889
static void _ifdown()
7990
{
8091
NetworkInterface::get_default_instance()->disconnect();
81-
printf("MBED: ifdown\n");
92+
print_to_console("MBED: ifdown\n");
8293
}
8394

8495
nsapi_error_t tcpsocket_connect_to_srv(TCPSocket &sock, uint16_t port)
@@ -88,17 +99,17 @@ nsapi_error_t tcpsocket_connect_to_srv(TCPSocket &sock, uint16_t port)
8899
NetworkInterface::get_default_instance()->gethostbyname(ECHO_SERVER_ADDR, &tcp_addr);
89100
tcp_addr.set_port(port);
90101

91-
printf("MBED: Server '%s', port %d\n", tcp_addr.get_ip_address(), tcp_addr.get_port());
102+
print_to_console("MBED: Server '%s', port %d\n", tcp_addr.get_ip_address(), tcp_addr.get_port());
92103

93104
nsapi_error_t err = sock.open(NetworkInterface::get_default_instance());
94105
if (err != NSAPI_ERROR_OK) {
95-
printf("Error from sock.open: %d\n", err);
106+
print_to_console("Error from sock.open: %d\n", err);
96107
return err;
97108
}
98109

99110
err = sock.connect(tcp_addr);
100111
if (err != NSAPI_ERROR_OK) {
101-
printf("Error from sock.connect: %d\n", err);
112+
print_to_console("Error from sock.connect: %d\n", err);
102113
return err;
103114
}
104115

TESTS/netsocket/tcp/tcp_tests.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ void fill_tx_buffer_ascii(char *buff, size_t len);
2727
nsapi_error_t tcpsocket_connect_to_echo_srv(TCPSocket &sock);
2828
nsapi_error_t tcpsocket_connect_to_discard_srv(TCPSocket &sock);
2929
bool is_tcp_supported();
30+
void print_to_console(const char* fmt, ...);
3031

3132
#define SKIP_IF_TCP_UNSUPPORTED() \
3233
if (!is_tcp_supported()) { \

TESTS/netsocket/tcp/tcpsocket_echotest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ void TCPSOCKET_ECHOTEST()
7272
fill_tx_buffer_ascii(tcp_global::tx_buffer, BUFF_SIZE);
7373
sent = sock.send(tcp_global::tx_buffer, pkt_s);
7474
if (sent < 0) {
75-
printf("[Round#%02d] network error %d\n", s_idx, sent);
75+
print_to_console("[Round#%02d] network error %d\n", s_idx, sent);
7676
TEST_FAIL();
7777
break;
7878
} else if (sent != pkt_s) {
79-
printf("[%02d] sock.send return size %d does not match the expectation %d\n", s_idx, sent, pkt_s);
79+
print_to_console("[%02d] sock.send return size %d does not match the expectation %d\n", s_idx, sent, pkt_s);
8080
TEST_FAIL();
8181
break;
8282
}
@@ -85,7 +85,7 @@ void TCPSOCKET_ECHOTEST()
8585
while (bytes2recv) {
8686
recvd = sock.recv(&(tcp_global::rx_buffer[sent - bytes2recv]), bytes2recv);
8787
if (recvd < 0) {
88-
printf("[Round#%02d] network error %d\n", s_idx, recvd);
88+
print_to_console("[Round#%02d] network error %d\n", s_idx, recvd);
8989
TEST_FAIL();
9090
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
9191
return;
@@ -110,7 +110,7 @@ void tcpsocket_echotest_nonblock_receive()
110110
}
111111
return;
112112
} else if (recvd < 0) {
113-
printf("sock.recv returned an error %d", recvd);
113+
print_to_console("sock.recv returned an error %d", recvd);
114114
TEST_FAIL();
115115
receive_error = true;
116116
} else {
@@ -171,7 +171,7 @@ void TCPSOCKET_ECHOTEST_NONBLOCK()
171171
}
172172
continue;
173173
} else if (sent <= 0) {
174-
printf("[Sender#%02d] network error %d\n", s_idx, sent);
174+
print_to_console("[Sender#%02d] network error %d\n", s_idx, sent);
175175
TEST_FAIL();
176176
goto END;
177177
}

TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ void TCPSOCKET_ECHOTEST_BURST()
5252
for (int i = 0; i < BURST_CNT; i++) {
5353
sent = sock.send(tcp_global::tx_buffer, BURST_SIZE);
5454
if (sent < 0) {
55-
printf("[%02d] network error %d\n", i, sent);
55+
print_to_console("[%02d] network error %d\n", i, sent);
5656
TEST_FAIL();
5757
break;
5858
} else if (sent != BURST_SIZE) {
59-
printf("[%02d] sock.send return size %d does not match the expectation %d\n", i, sent, BURST_SIZE);
59+
print_to_console("[%02d] sock.send return size %d does not match the expectation %d\n", i, sent, BURST_SIZE);
6060
TEST_FAIL();
6161
break;
6262
}
@@ -65,7 +65,7 @@ void TCPSOCKET_ECHOTEST_BURST()
6565
while (bytes2recv) {
6666
recvd = sock.recv(&(tcp_global::rx_buffer[sent - bytes2recv]), bytes2recv);
6767
if (recvd < 0) {
68-
printf("[Round#%02d] network error %d\n", i, recvd);
68+
print_to_console("[Round#%02d] network error %d\n", i, recvd);
6969
TEST_FAIL();
7070
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
7171
return;
@@ -103,7 +103,7 @@ void TCPSOCKET_ECHOTEST_BURST_NONBLOCK()
103103
}
104104
continue;
105105
} else if (sent < 0) {
106-
printf("[%02d] network error %d\n", i, sent);
106+
print_to_console("[%02d] network error %d\n", i, sent);
107107
TEST_FAIL();
108108
goto END;
109109
}
@@ -119,19 +119,19 @@ void TCPSOCKET_ECHOTEST_BURST_NONBLOCK()
119119
recvd = sock.recv(&(tcp_global::rx_buffer[BURST_SIZE - bt_left]), BURST_SIZE);
120120
if (recvd == NSAPI_ERROR_WOULD_BLOCK) {
121121
if (osSignalWait(SIGNAL_SIGIO, SIGIO_TIMEOUT).status == osEventTimeout) {
122-
printf("[bt#%02d] packet timeout...", i);
122+
print_to_console("[bt#%02d] packet timeout...", i);
123123
break;
124124
}
125125
continue;
126126
} else if (recvd < 0) {
127-
printf("[%02d] network error %d\n", i, recvd);
127+
print_to_console("[%02d] network error %d\n", i, recvd);
128128
break;
129129
}
130130
bt_left -= recvd;
131131
}
132132

133133
if (bt_left != 0) {
134-
printf("network error %d, missing %d bytes from a burst\n", recvd, bt_left);
134+
print_to_console("network error %d, missing %d bytes from a burst\n", recvd, bt_left);
135135
TEST_FAIL();
136136
goto END;
137137
}

TESTS/netsocket/tcp/tcpsocket_open_limit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void TCPSOCKET_OPEN_LIMIT()
4949
}
5050
ret = sock->open(NetworkInterface::get_default_instance());
5151
if (ret == NSAPI_ERROR_NO_MEMORY || ret == NSAPI_ERROR_NO_SOCKET) {
52-
printf("[round#%02d] unable to open new socket, error: %d\n", i, ret);
52+
print_to_console("[round#%02d] unable to open new socket, error: %d\n", i, ret);
5353
delete sock;
5454
break;
5555
}
@@ -91,7 +91,7 @@ void TCPSOCKET_OPEN_LIMIT()
9191
delete tmp->sock;
9292
delete tmp;
9393
}
94-
printf("[round#%02d] %d sockets opened\n", i, open_sockets[i]);
94+
print_to_console("[round#%02d] %d sockets opened\n", i, open_sockets[i]);
9595
}
9696
TEST_ASSERT_EQUAL(open_sockets[0], open_sockets[1]);
9797
TEST_ASSERT(open_sockets[0] >= 4);

TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void rcv_n_chk_against_rfc864_pattern(TCPSocket &sock)
113113
recvd_size += rd;
114114
}
115115
timer.stop();
116-
printf("MBED: Time taken: %fs\n", timer.read());
116+
print_to_console("MBED: Time taken: %fs\n", timer.read());
117117
}
118118

119119
void TCPSOCKET_RECV_100K()
@@ -163,7 +163,7 @@ void rcv_n_chk_against_rfc864_pattern_nonblock(TCPSocket &sock)
163163
}
164164
}
165165
timer.stop();
166-
printf("MBED: Time taken: %fs\n", timer.read());
166+
print_to_console("MBED: Time taken: %fs\n", timer.read());
167167
}
168168

169169
static void _sigio_handler(osThreadId id)

TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ void TCPSOCKET_RECV_TIMEOUT()
6868
goto CLEANUP;
6969
}
7070
int recv_time_ms = (timer.read_us() + 500) / 1000;
71-
printf("MBED: recv() took: %dus\n", recv_time_ms);
71+
print_to_console("MBED: recv() took: %dus\n", recv_time_ms);
7272
if (recv_time_ms > 150) {
7373
TEST_ASSERT(150 - recv_time_ms < 51);
7474
} else {
7575
TEST_ASSERT(recv_time_ms - 150 < 51);
7676
}
7777
continue;
7878
} else if (recvd < 0) {
79-
printf("[pkt#%02d] network error %d\n", i, recvd);
79+
print_to_console("[pkt#%02d] network error %d\n", i, recvd);
8080
TEST_FAIL();
8181
goto CLEANUP;
8282
}

TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void TCPSOCKET_SEND_TIMEOUT()
4545
(timer.read_ms() <= 800)) {
4646
continue;
4747
}
48-
printf("send: err %d, time %d", err, timer.read_ms());
48+
print_to_console("send: err %d, time %d", err, timer.read_ms());
4949
TEST_FAIL();
5050
break;
5151
}

0 commit comments

Comments
 (0)