Skip to content

Commit 0e72912

Browse files
authored
Merge pull request #14697 from jamesbeyond/fix_inte_test
TESTS: rename variable interface to fix broken tests
2 parents a2d62f9 + 8301854 commit 0e72912

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

TESTS/integration/net-single/main.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ void led_thread()
5656
#endif
5757

5858
#define MAX_RETRIES 3
59-
NetworkInterface *interface = NULL;
59+
NetworkInterface *netif = NULL;
6060
static control_t setup_network(const size_t call_count)
6161
{
62-
interface = NetworkInterface::get_default_instance();
63-
TEST_ASSERT_NOT_NULL_MESSAGE(interface, "failed to initialize network");
62+
netif = NetworkInterface::get_default_instance();
63+
TEST_ASSERT_NOT_NULL_MESSAGE(netif, "failed to initialize network");
6464

6565
nsapi_error_t err = -1;
6666
for (int tries = 0; tries < MAX_RETRIES; tries++) {
67-
err = interface->connect();
67+
err = netif->connect();
6868
if (err == NSAPI_ERROR_OK) {
6969
break;
7070
} else {
@@ -78,34 +78,34 @@ static control_t setup_network(const size_t call_count)
7878

7979
static control_t download_128(const size_t call_count)
8080
{
81-
download_test(interface, story, sizeof(story), 128);
81+
download_test(netif, story, sizeof(story), 128);
8282

8383
return CaseNext;
8484
}
8585
static control_t download_256(const size_t call_count)
8686
{
87-
download_test(interface, story, sizeof(story), 256);
87+
download_test(netif, story, sizeof(story), 256);
8888

8989
return CaseNext;
9090
}
9191

9292
static control_t download_1k(const size_t call_count)
9393
{
94-
download_test(interface, story, sizeof(story), 1024);
94+
download_test(netif, story, sizeof(story), 1024);
9595

9696
return CaseNext;
9797
}
9898

9999
static control_t download_2k(const size_t call_count)
100100
{
101-
download_test(interface, story, sizeof(story), 2 * 1024);
101+
download_test(netif, story, sizeof(story), 2 * 1024);
102102

103103
return CaseNext;
104104
}
105105

106106
static control_t download_4k(const size_t call_count)
107107
{
108-
download_test(interface, story, sizeof(story), 4 * 1024);
108+
download_test(netif, story, sizeof(story), 4 * 1024);
109109

110110
return CaseNext;
111111
}

TESTS/integration/stress-net-fs/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ void led_thread()
6161
#endif
6262

6363
#define MAX_RETRIES 3
64-
NetworkInterface *interface = NULL;
64+
NetworkInterface *netif = NULL;
6565

6666
static control_t setup_network(const size_t call_count)
6767
{
68-
interface = NetworkInterface::get_default_instance();
69-
TEST_ASSERT_NOT_NULL_MESSAGE(interface, "failed to initialize network");
68+
netif = NetworkInterface::get_default_instance();
69+
TEST_ASSERT_NOT_NULL_MESSAGE(netif, "failed to initialize network");
7070

7171
nsapi_error_t err = -1;
7272
for (int tries = 0; tries < MAX_RETRIES; tries++) {
73-
err = interface->connect();
73+
err = netif->connect();
7474
if (err == NSAPI_ERROR_OK) {
7575
break;
7676
} else {
@@ -106,7 +106,7 @@ static uint32_t thread_counter = 0;
106106
void download_fn()
107107
{
108108
uint32_t thread_id = core_util_atomic_incr_u32(&thread_counter, 1);
109-
download_test(interface, story, sizeof(story), 256, thread_id);
109+
download_test(netif, story, sizeof(story), 256, thread_id);
110110
}
111111
void file_fn(size_t buffer)
112112
{

0 commit comments

Comments
 (0)