Incorporated review comments

pull/11824/head
RAJKUMAR KANAGARAJ 2019-11-11 04:57:42 -08:00
parent 120ca1b245
commit a682fde31c
65 changed files with 65 additions and 76 deletions

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] LORADIO test cases requires RTOS to run.
#error [NOT_SUPPORTED] LORADIO test cases require a RTOS to run.
#else
#include "utest.h"

View File

@ -42,4 +42,4 @@ void ASYNCHRONOUS_DNS()
TEST_ASSERT_EQUAL(0, result_dns_failure);
TEST_ASSERT_EQUAL(0, result_exp_timeout);
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -67,4 +67,4 @@ void ASYNCHRONOUS_DNS_CACHE()
dns_test_hosts[0], data.addr.get_ip_address(), delay_ms);
}
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -87,4 +87,4 @@ void ASYNCHRONOUS_DNS_CANCEL()
ThisThread::sleep_for(5000);
}
#endif // #if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -43,4 +43,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS()
TEST_ASSERT_EQUAL(0, result_dns_failure);
TEST_ASSERT_EQUAL(0, result_exp_timeout);
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -44,4 +44,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_CACHE()
TEST_ASSERT_EQUAL(0, result_dns_failure);
TEST_ASSERT_EQUAL(0, result_exp_timeout);
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -46,4 +46,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT()
TEST_ASSERT_EQUAL(0, result_exp_timeout);
}
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -17,7 +17,6 @@
#ifndef DNS_TESTS_H
#define DNS_TESTS_H
#if defined(MBED_CONF_RTOS_PRESENT)
#include "nsapi_dns.h"
@ -93,5 +92,4 @@ void SYNCHRONOUS_DNS();
void SYNCHRONOUS_DNS_MULTIPLE();
void SYNCHRONOUS_DNS_CACHE();
void SYNCHRONOUS_DNS_INVALID();
#endif /* defined(MBED_CONF_RTOS_PRESENT) */
#endif

View File

@ -16,7 +16,7 @@
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] dns test cases requires RTOS to run.
#error [NOT_SUPPORTED] dns test cases require a RTOS to run.
#else
#define WIFI 2

View File

@ -41,4 +41,4 @@ void SYNCHRONOUS_DNS()
TEST_ASSERT_EQUAL(0, result_dns_failure);
TEST_ASSERT_EQUAL(0, result_exp_timeout);
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -56,4 +56,4 @@ void SYNCHRONOUS_DNS_CACHE()
dns_test_hosts[0], address.get_ip_address(), delay_ms);
}
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -61,4 +61,4 @@ void SYNCHRONOUS_DNS_INVALID()
TEST_ASSERT_EQUAL(expected_failures, result_dns_failure);
TEST_ASSERT_EQUAL(0, result_exp_timeout);
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -41,4 +41,4 @@ void SYNCHRONOUS_DNS_MULTIPLE()
TEST_ASSERT_EQUAL(0, result_dns_failure);
TEST_ASSERT_EQUAL(0, result_exp_timeout);
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -16,7 +16,7 @@
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] tcp test cases requires RTOS to run
#error [NOT_SUPPORTED] tcp test cases require a RTOS to run
#else
#define WIFI 2

View File

@ -17,7 +17,6 @@
#ifndef TCP_TESTS_H
#define TCP_TESTS_H
#if defined(MBED_CONF_RTOS_PRESENT)
#include "../test_params.h"
@ -89,4 +88,3 @@ void TCPSOCKET_THREAD_PER_SOCKET_SAFETY();
void TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID();
#endif //TCP_TESTS_H
#endif //!defined(MBED_CONF_RTOS_PRESENT)

View File

@ -44,4 +44,4 @@ void TCPSOCKET_BIND_ADDRESS()
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -51,4 +51,4 @@ void TCPSOCKET_BIND_ADDRESS_INVALID()
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -43,4 +43,4 @@ void TCPSOCKET_BIND_ADDRESS_NULL()
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -43,4 +43,4 @@ void TCPSOCKET_BIND_ADDRESS_PORT()
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -43,4 +43,4 @@ void TCPSOCKET_BIND_PORT()
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -53,4 +53,4 @@ void TCPSOCKET_BIND_PORT_FAIL()
delete sock;
delete sock2;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -42,4 +42,4 @@ void TCPSOCKET_BIND_UNOPENED()
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -52,4 +52,4 @@ void TCPSOCKET_BIND_WRONG_TYPE()
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -38,4 +38,4 @@ void TCPSOCKET_CONNECT_INVALID()
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -202,4 +202,4 @@ END:
tc_exec_time.stop();
free(stack_mem);
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -142,4 +142,4 @@ void TCPSOCKET_ECHOTEST_BURST_NONBLOCK()
END:
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -89,4 +89,4 @@ void TCPSOCKET_ENDPOINT_CLOSE()
tc_exec_time.stop();
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -39,4 +39,4 @@ void TCPSOCKET_OPEN_CLOSE_REPEAT()
}
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -37,4 +37,4 @@ void TCPSOCKET_OPEN_DESTRUCT()
delete sock;
}
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -97,4 +97,4 @@ void TCPSOCKET_OPEN_LIMIT()
TEST_ASSERT_EQUAL(open_sockets[0], open_sockets[1]);
TEST_ASSERT(open_sockets[0] >= 4);
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -38,4 +38,4 @@ void TCPSOCKET_OPEN_TWICE()
delete sock;
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -196,4 +196,4 @@ void TCPSOCKET_RECV_100K_NONBLOCK()
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -89,4 +89,4 @@ CLEANUP:
tc_exec_time.stop();
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -44,4 +44,4 @@ void TCPSOCKET_SEND_REPEAT()
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -53,4 +53,4 @@ void TCPSOCKET_SEND_TIMEOUT()
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -50,4 +50,4 @@ void TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID()
// TEST_ASSERT_EQUAL(optval, seconds);
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -168,4 +168,4 @@ void TCPSOCKET_THREAD_PER_SOCKET_SAFETY()
running = false;
thread.join();
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -16,7 +16,7 @@
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] tls test cases requires RTOS to run
#error [NOT_SUPPORTED] tls test cases require a RTOS to run
#else
#define WIFI 2
#if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \

View File

@ -17,7 +17,6 @@
#ifndef TLS_TESTS_H
#define TLS_TESTS_H
#if defined(MBED_CONF_RTOS_PRESENT)
#include "../test_params.h"
#include "TLSSocket.h"
@ -84,5 +83,5 @@ void TLSSOCKET_SIMULTANEOUS();
void TLSSOCKET_SEND_TIMEOUT();
#endif // defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY)
#endif // !defined(MBED_CONF_RTOS_PRESENT)
#endif //TLS_TESTS_H

View File

@ -16,7 +16,7 @@
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] udp test cases requires RTOS to run.
#error [NOT_SUPPORTED] udp test cases require a RTOS to run.
#else
#define WIFI 2

View File

@ -554,4 +554,4 @@ EmacTestMemoryManager &EmacTestMemoryManager::get_instance()
return test_memory_manager;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -17,7 +17,6 @@
#ifndef EMAC_TEST_MEMORY_MANAGER_H
#define EMAC_TEST_MEMORY_MANAGER_H
#if defined(MBED_CONF_RTOS_PRESENT)
#include <list>
@ -226,5 +225,5 @@ private:
unsigned int m_alloc_unit;
bool m_memory_available;
};
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
#endif /* EMAC_TEST_MEMORY_MANAGER_H */

View File

@ -203,5 +203,5 @@ OnboardNetworkStack &OnboardNetworkStack::get_default_instance()
{
return EmacTestNetworkStack::get_instance();
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)
#endif

View File

@ -17,7 +17,6 @@
#ifndef EMAC_TEST_NETWORK_STACK_H
#define EMAC_TEST_NETWORK_STACK_H
#if defined(MBED_CONF_RTOS_PRESENT)
#include "netsocket/nsapi_types.h"
#include "netsocket/EMAC.h"
@ -388,5 +387,5 @@ private:
Interface *m_interface;
};
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
#endif /* EMAC_TEST_NETWORK_STACK_H */

View File

@ -149,5 +149,5 @@ void emac_if_ctp_msg_build(int eth_frame_len, const unsigned char *dest_addr, co
emac_if_get()->link_out(buf);
emac_if_check_memory(false);
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -17,7 +17,7 @@
#ifndef EMAC_CTP_H
#define EMAC_CTP_H
#if defined(MBED_CONF_RTOS_PRESENT)
enum ctp_function {
CTP_NONE,
CTP_FORWARD,
@ -37,5 +37,5 @@ enum ctp_function {
ctp_function emac_if_ctp_header_handle(unsigned char *eth_input_frame, unsigned char *eth_output_frame, unsigned char *origin_addr, int *receipt_number);
void emac_if_ctp_msg_build(int eth_frame_len, const unsigned char *dest_addr, const unsigned char *origin_addr, const unsigned char *forward_addr, int options);
void emac_if_ctp_reply_handle(int lenght, int invalid_data_index);
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
#endif /* EMAC_CTP_H */

View File

@ -17,11 +17,10 @@
#ifndef EMAC_INITIALIZE_H
#define EMAC_INITIALIZE_H
#if defined(MBED_CONF_RTOS_PRESENT)
unsigned char *emac_if_get_hw_addr(void);
bool emac_if_init(EMAC *emac);
EMAC *emac_if_get(void);
EmacTestMemoryManager *emac_m_mngr_get(void);
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
#endif /* EMAC_INITIALIZE_H */

View File

@ -76,4 +76,4 @@ void emac_if_memory_buffer_write(void *buf, unsigned char *eth_frame, bool write
}
}
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -17,8 +17,8 @@
#ifndef EMAC_MEMBUF_H
#define EMAC_MEMBUF_H
#if defined(MBED_CONF_RTOS_PRESENT)
int emac_if_memory_buffer_read(void *buf, unsigned char *eth_frame);
void emac_if_memory_buffer_write(void *buf, unsigned char *eth_frame, bool write_data);
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
#endif /* EMAC_MEMBUF_H */

View File

@ -100,4 +100,4 @@ void test_emac_broadcast(void)
RESET_OUTGOING_MSG_DATA;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -118,4 +118,4 @@ bool emac_if_init(EMAC *emac)
return true;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -162,4 +162,4 @@ void test_emac_memory()
TEST_ASSERT_FALSE(ERROR_FLAGS);
RESET_OUTGOING_MSG_DATA;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -173,4 +173,4 @@ void test_emac_multicast_filter()
RESET_OUTGOING_MSG_DATA;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -77,4 +77,4 @@ void test_emac_unicast()
RESET_OUTGOING_MSG_DATA;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -86,4 +86,4 @@ void test_emac_unicast_burst()
RESET_OUTGOING_MSG_DATA;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -80,4 +80,4 @@ void test_emac_unicast_frame_len()
TEST_ASSERT_FALSE(ERROR_FLAGS);
RESET_OUTGOING_MSG_DATA;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -82,4 +82,4 @@ void test_emac_unicast_long()
TEST_ASSERT_FALSE(ERROR_FLAGS);
RESET_OUTGOING_MSG_DATA;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -17,7 +17,7 @@
#ifndef EMAC_TESTS_H
#define EMAC_TESTS_H
#if defined(MBED_CONF_RTOS_PRESENT)
void test_emac_initialize();
void test_emac_broadcast();
void test_emac_unicast();
@ -26,5 +26,5 @@ void test_emac_unicast_burst();
void test_emac_unicast_long();
void test_emac_multicast_filter();
void test_emac_memory();
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
#endif /* EMAC_TESTS_H */

View File

@ -583,4 +583,4 @@ void emac_if_set_mtu_size(int mtu_size)
{
eth_mtu_size = mtu_size;
}
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -17,7 +17,6 @@
#ifndef EMAC_UTIL_H
#define EMAC_UTIL_H
#if defined(MBED_CONF_RTOS_PRESENT)
#define SECOND_TO_US 1000000
#define SECOND_TO_MS 1000
@ -125,5 +124,5 @@ void worker_loop_init(void);
void worker_loop_start(void (*test_step_cb_fnc)(int opt), int timeout);
void worker_loop_end(void);
void worker_loop_link_up_wait(void);
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
#endif /* EMAC_UTIL_H */

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] EMAC test cases requires RTOS to run
#error [NOT_SUPPORTED] EMAC test cases require a RTOS to run
#else
#if !defined(MBED_CONF_APP_ECHO_SERVER) || \

View File

@ -16,7 +16,7 @@
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] network interface test cases requires RTOS to run.
#error [NOT_SUPPORTED] network interface test cases require a RTOS to run.
#else
#define WIFI 2

View File

@ -113,7 +113,7 @@ MBED_WEAK L3IP &L3IP::get_default_instance()
{
return Cellular_driver_L3IP::get_instance();
}
#endif
#endif // defined(MBED_CONF_RTOS_PRESENT)
/**
* @}
*/

View File

@ -17,7 +17,6 @@
#ifndef CELLULAR_DRIVER_L3IP_H_
#define CELLULAR_DRIVER_L3IP_H_
#if defined(MBED_CONF_RTOS_PRESENT)
#include "L3IP.h"
@ -134,4 +133,3 @@ private:
};
#endif /* CELLULAR_DRIVER_L3IP_H_ */
#endif

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] l3ip test cases requires RTOS to run
#error [NOT_SUPPORTED] l3ip test cases require a RTOS to run
#else
#include "mbed.h"