mirror of https://github.com/ARMmbed/mbed-os.git
Valgrind issues fixed
parent
de9e292bf9
commit
0cf503cb4f
|
@ -248,11 +248,14 @@ TEST_F(Test_LoRaWANStack, connect)
|
|||
equeue_stub.call_cb_immediately = true;
|
||||
loramac_mcps_confirm_t conf;
|
||||
LoRaMac_stub::mcps_conf_ptr = &conf;
|
||||
radio._ev->tx_done();
|
||||
conf.req_type = MCPS_CONFIRMED;
|
||||
|
||||
loramac_mcps_indication_t ind;
|
||||
LoRaMac_stub::mcps_ind_ptr = &ind;
|
||||
ind.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
ind.is_ack_recvd = true;
|
||||
|
||||
radio._ev->tx_done();
|
||||
|
||||
loramac_mlme_indication_t mlme_ind;
|
||||
mlme_ind.indication_type = MLME_JOIN_ACCEPT;
|
||||
|
@ -477,6 +480,7 @@ TEST_F(Test_LoRaWANStack, handle_rx)
|
|||
loramac_mlme_confirm_t mlme;
|
||||
LoRaMac_stub::mlme_conf_ptr = &mlme;
|
||||
mlme.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
mlme.type = MLME_SCHEDULE_UPLINK;
|
||||
LoRaMac_stub::bool_value = true;
|
||||
conf.req_type = MCPS_PROPRIETARY;
|
||||
|
||||
|
@ -503,8 +507,8 @@ TEST_F(Test_LoRaWANStack, handle_rx)
|
|||
//data == NULL || LENGTH == 0 (2 cases)
|
||||
EXPECT_TRUE(LORAWAN_STATUS_PARAMETER_INVALID == object->handle_rx(NULL, 0, port, flags, false));
|
||||
uint8_t data[50];
|
||||
EXPECT_TRUE(LORAWAN_STATUS_PARAMETER_INVALID == object->handle_rx(data, 0, port, flags, false));
|
||||
|
||||
EXPECT_TRUE(LORAWAN_STATUS_PARAMETER_INVALID == object->handle_rx(data, 0, port, flags, false));
|
||||
//validate_params returns Would block
|
||||
port = 43;
|
||||
EXPECT_TRUE(LORAWAN_STATUS_WOULD_BLOCK == object->handle_rx(data, 50, port, flags, true));
|
||||
|
@ -672,6 +676,7 @@ TEST_F(Test_LoRaWANStack, acquire_rx_metadata)
|
|||
loramac_mlme_confirm_t mlme;
|
||||
mlme.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
LoRaMac_stub::mlme_conf_ptr = &mlme;
|
||||
mlme.type = MLME_SCHEDULE_UPLINK;
|
||||
|
||||
//Visit mlme_confirm_handler here also
|
||||
mlme.status = LORAMAC_EVENT_INFO_STATUS_CRYPTO_FAIL;
|
||||
|
@ -749,6 +754,7 @@ TEST_F(Test_LoRaWANStack, interrupt_functions)
|
|||
equeue_stub.void_ptr = &ptr;
|
||||
equeue_stub.call_cb_immediately = true;
|
||||
loramac_mcps_confirm_t conf;
|
||||
conf.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
LoRaMac_stub::mcps_conf_ptr = &conf;
|
||||
radio._ev->tx_done();
|
||||
|
||||
|
@ -758,6 +764,7 @@ TEST_F(Test_LoRaWANStack, interrupt_functions)
|
|||
loramac_mlme_confirm_t mlme;
|
||||
LoRaMac_stub::mlme_conf_ptr = &mlme;
|
||||
mlme.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
mlme.type = MLME_SCHEDULE_UPLINK;
|
||||
LoRaMac_stub::bool_value = false;
|
||||
radio._ev->rx_done(NULL, 0, 0, 0);
|
||||
|
||||
|
@ -810,6 +817,7 @@ TEST_F(Test_LoRaWANStack, process_transmission)
|
|||
equeue_stub.void_ptr = &ptr;
|
||||
equeue_stub.call_cb_immediately = true;
|
||||
loramac_mcps_confirm_t conf;
|
||||
conf.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
LoRaMac_stub::mcps_conf_ptr = &conf;
|
||||
radio._ev->tx_done();
|
||||
|
||||
|
@ -819,6 +827,7 @@ TEST_F(Test_LoRaWANStack, process_transmission)
|
|||
loramac_mlme_confirm_t mlme;
|
||||
LoRaMac_stub::mlme_conf_ptr = &mlme;
|
||||
mlme.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
mlme.type = MLME_SCHEDULE_UPLINK;
|
||||
LoRaMac_stub::bool_value = false;
|
||||
radio._ev->rx_done(NULL, 0, 0, 0);
|
||||
|
||||
|
@ -865,6 +874,7 @@ TEST_F(Test_LoRaWANStack, process_reception)
|
|||
equeue_stub.void_ptr = &ptr;
|
||||
equeue_stub.call_cb_immediately = true;
|
||||
loramac_mcps_confirm_t conf;
|
||||
conf.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
memset(&conf, 0, sizeof(&conf));
|
||||
LoRaMac_stub::mcps_conf_ptr = &conf;
|
||||
radio._ev->tx_done();
|
||||
|
@ -876,6 +886,7 @@ TEST_F(Test_LoRaWANStack, process_reception)
|
|||
loramac_mlme_confirm_t mlme;
|
||||
LoRaMac_stub::mlme_conf_ptr = &mlme;
|
||||
mlme.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
mlme.type = MLME_SCHEDULE_UPLINK;
|
||||
LoRaMac_stub::bool_value = true;
|
||||
conf.req_type = MCPS_PROPRIETARY;
|
||||
|
||||
|
|
Loading…
Reference in New Issue