Skip to content

Commit b1b6399

Browse files
author
Cruz Monrreal
authored
Merge pull request #8132 from VeijoPesonen/bugfix-tests-netsocket-tcp-stacksize
gt netsocket tcp - increases threads' stack size
2 parents 6b85ec7 + c454691 commit b1b6399

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

TESTS/netsocket/tcp/tcp_tests.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ nsapi_error_t tcpsocket_connect_to_discard_srv(TCPSocket &sock);
3030
int split2half_rmng_tcp_test_time(); // [s]
3131

3232
namespace tcp_global {
33-
static const int TESTS_TIMEOUT = 480;
34-
static const int TCP_OS_STACK_SIZE = 1024;
33+
static const int TESTS_TIMEOUT = 960;
34+
static const int TCP_OS_STACK_SIZE = 2048;
3535

3636
static const int RX_BUFF_SIZE = 1220;
3737
static const int TX_BUFF_SIZE = 1220;

TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static const int SIGNAL_SIGIO1 = 0x1;
2929
static const int SIGNAL_SIGIO2 = 0x2;
3030
static const int SIGIO_TIMEOUT = 5000; //[ms]
3131

32-
Thread thread;
32+
Thread thread(osPriorityNormal, tcp_global::TCP_OS_STACK_SIZE);
3333
volatile bool running = true;
3434
}
3535

@@ -50,8 +50,8 @@ static void check_const_len_rand_sequence()
5050
sock.sigio(callback(_sigio_handler1, Thread::gettid()));
5151

5252
static const int BUFF_SIZE = 10;
53-
char rx_buff[BUFF_SIZE] = {0};
54-
char tx_buff[BUFF_SIZE] = {0};
53+
static char rx_buff[BUFF_SIZE] = {0};
54+
static char tx_buff[BUFF_SIZE] = {0};
5555

5656

5757
int bytes2process;
@@ -107,8 +107,8 @@ static void check_var_len_rand_sequence()
107107
sock.sigio(callback(_sigio_handler2, Thread::gettid()));
108108

109109
static const int BUFF_SIZE = 1001;
110-
char rx_buff[BUFF_SIZE];
111-
char tx_buff[BUFF_SIZE];
110+
static char rx_buff[BUFF_SIZE];
111+
static char tx_buff[BUFF_SIZE];
112112
static const int pkt_size_diff = 100;
113113

114114
int bytes2process;

0 commit comments

Comments
 (0)