diff --git a/CMakeLists.txt b/CMakeLists.txt index 57e8e718c0..0aa90a3a7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2215,7 +2215,7 @@ if(ENABLE_TESTS) NAME benchmark GITHUB_REPOSITORY google/benchmark VERSION 1.9.0 - OPTIONS "BENCHMARK_ENABLE_TESTING OFF" + OPTIONS "BENCHMARK_ENABLE_TESTING OFF" "BENCHMARK_ENABLE_WERROR OFF" ) endif() endif() diff --git a/common/utils/tests/test_tpool_vs_actors.c b/common/utils/tests/test_tpool_vs_actors.c index a907e07c9b..99d71aa9ca 100644 --- a/common/utils/tests/test_tpool_vs_actors.c +++ b/common/utils/tests/test_tpool_vs_actors.c @@ -6,6 +6,7 @@ #include "thread-pool.h" #include "task.h" #include "log.h" +#include #include #define NUM_THREADS 10 @@ -16,6 +17,8 @@ typedef struct { int actor_index; } actor_task_t; +struct timespec ts_arr[NUM_JOBS]; + long long delay_table[NUM_THREADS] = {0}; void calculate_delay(struct timespec* send_ts, int thread_index) @@ -32,7 +35,6 @@ void tpool_function(void* args) { int worker_id = get_tpool_worker_index(); calculate_delay((struct timespec*)args, worker_id); - free(args); } void actor_function(void* args) @@ -62,7 +64,7 @@ int main() // Push tasks to the thread pool for (int i = 0; i < NUM_JOBS; i++) { - struct timespec* ts = malloc(sizeof(struct timespec)); + struct timespec* ts = &ts_arr[i]; clock_gettime(CLOCK_MONOTONIC, ts); task.args = ts; pushTpool(&pool, task); @@ -78,7 +80,6 @@ int main() float average_delay = sum_delay / (NUM_JOBS * 1.0f); printf("Average task delay on tpool: %.2f ns\n", average_delay); - memset(delay_table, 0, sizeof(delay_table)); Actor_t actors[NUM_THREADS]; @@ -106,4 +107,4 @@ int main() average_delay = sum_delay / (NUM_JOBS * 1.0f); printf("Average task delay on actors: %.2f ns\n", average_delay); return 0; -} \ No newline at end of file +} diff --git a/nfapi/tests/nr_fapi_test.h b/nfapi/tests/nr_fapi_test.h index 2007137dc0..ce306dbc0a 100644 --- a/nfapi/tests/nr_fapi_test.h +++ b/nfapi/tests/nr_fapi_test.h @@ -17,6 +17,8 @@ #include "nfapi_nr_interface.h" #include "nfapi_nr_interface_scf.h" +#include "common/platform_types.h" + #define FILL_TLV(TlV, TaG, VaL) \ do { \ TlV.tl.tag = TaG; \ @@ -64,8 +66,6 @@ uint32_t rand32_range(uint32_t lower, uint32_t upper) return (rand() % (upper - lower + 1)) + lower; } -int main(int n, char *v[]); - static inline void fapi_test_init_seeded(time_t seed) { srand(seed); diff --git a/nfapi/tests/p5/nr_fapi_config_request_test.c b/nfapi/tests/p5/nr_fapi_config_request_test.c index 51139ea5e8..0eca22d156 100644 --- a/nfapi/tests/p5/nr_fapi_config_request_test.c +++ b/nfapi/tests/p5/nr_fapi_config_request_test.c @@ -495,7 +495,7 @@ static void test_config_req_fdd(void) free_config_request(&req); } -int main(int n, char *v[]) +int main() { fapi_test_init(); test_config_req_rand(); diff --git a/nfapi/tests/p5/nr_fapi_config_response_test.c b/nfapi/tests/p5/nr_fapi_config_response_test.c index 4d97de5d4d..4da989d5fb 100644 --- a/nfapi/tests/p5/nr_fapi_config_response_test.c +++ b/nfapi/tests/p5/nr_fapi_config_response_test.c @@ -97,7 +97,7 @@ void test_copy(const nfapi_nr_config_response_scf_t *msg) free_config_response(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p5/nr_fapi_error_indication_test.c b/nfapi/tests/p5/nr_fapi_error_indication_test.c index d90e8babc1..bbe275581d 100644 --- a/nfapi/tests/p5/nr_fapi_error_indication_test.c +++ b/nfapi/tests/p5/nr_fapi_error_indication_test.c @@ -45,7 +45,7 @@ void test_copy(const nfapi_nr_error_indication_scf_t *msg) free_error_indication(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p5/nr_fapi_param_request_test.c b/nfapi/tests/p5/nr_fapi_param_request_test.c index 34dd44cd57..416c9f2263 100644 --- a/nfapi/tests/p5/nr_fapi_param_request_test.c +++ b/nfapi/tests/p5/nr_fapi_param_request_test.c @@ -46,7 +46,7 @@ void test_copy(const nfapi_nr_param_request_scf_t *msg) free_param_request(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p5/nr_fapi_param_response_test.c b/nfapi/tests/p5/nr_fapi_param_response_test.c index e19b38804d..3b200d1d48 100644 --- a/nfapi/tests/p5/nr_fapi_param_response_test.c +++ b/nfapi/tests/p5/nr_fapi_param_response_test.c @@ -238,7 +238,7 @@ void test_copy(const nfapi_nr_param_response_scf_t *msg) free_param_response(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); nfapi_nr_param_response_scf_t req = {.header.message_id = NFAPI_NR_PHY_MSG_TYPE_PARAM_RESPONSE}; diff --git a/nfapi/tests/p5/nr_fapi_start_request_test.c b/nfapi/tests/p5/nr_fapi_start_request_test.c index d5891d9c33..6ccfb163e1 100644 --- a/nfapi/tests/p5/nr_fapi_start_request_test.c +++ b/nfapi/tests/p5/nr_fapi_start_request_test.c @@ -46,7 +46,7 @@ void test_copy(const nfapi_nr_start_request_scf_t *msg) free_start_request(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p5/nr_fapi_start_response_test.c b/nfapi/tests/p5/nr_fapi_start_response_test.c index c011f88cb6..8d91125b28 100644 --- a/nfapi/tests/p5/nr_fapi_start_response_test.c +++ b/nfapi/tests/p5/nr_fapi_start_response_test.c @@ -46,7 +46,7 @@ void test_copy(const nfapi_nr_start_response_scf_t *msg) free_start_response(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p5/nr_fapi_stop_indication_test.c b/nfapi/tests/p5/nr_fapi_stop_indication_test.c index ff50ace4f9..0f1bdef2f0 100644 --- a/nfapi/tests/p5/nr_fapi_stop_indication_test.c +++ b/nfapi/tests/p5/nr_fapi_stop_indication_test.c @@ -46,7 +46,7 @@ void test_copy(const nfapi_nr_stop_indication_scf_t *msg) free_stop_indication(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p5/nr_fapi_stop_request_test.c b/nfapi/tests/p5/nr_fapi_stop_request_test.c index 5eb1b09561..e0984d4d7b 100644 --- a/nfapi/tests/p5/nr_fapi_stop_request_test.c +++ b/nfapi/tests/p5/nr_fapi_stop_request_test.c @@ -46,7 +46,7 @@ void test_copy(const nfapi_nr_stop_request_scf_t *msg) free_stop_request(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_crc_indication_test.c b/nfapi/tests/p7/nr_fapi_crc_indication_test.c index e8edcdbf8d..038884f03e 100644 --- a/nfapi/tests/p7/nr_fapi_crc_indication_test.c +++ b/nfapi/tests/p7/nr_fapi_crc_indication_test.c @@ -78,7 +78,7 @@ static void test_copy(const nfapi_nr_crc_indication_t *msg) free_crc_indication(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_dci_inversion_test.c b/nfapi/tests/p7/nr_fapi_dci_inversion_test.c index 1225b83197..17e744534b 100644 --- a/nfapi/tests/p7/nr_fapi_dci_inversion_test.c +++ b/nfapi/tests/p7/nr_fapi_dci_inversion_test.c @@ -35,7 +35,7 @@ void test_pack_payload(uint8_t payloadSizeBits, uint8_t payload[]) // All tests successful! } -int main(int n, char *v[]) +int main() { fapi_test_init(); uint8_t upper = 8 * DCI_PAYLOAD_BYTE_LEN; diff --git a/nfapi/tests/p7/nr_fapi_dl_tti_request_test.c b/nfapi/tests/p7/nr_fapi_dl_tti_request_test.c index eef184badf..58b8ac08ce 100644 --- a/nfapi/tests/p7/nr_fapi_dl_tti_request_test.c +++ b/nfapi/tests/p7/nr_fapi_dl_tti_request_test.c @@ -246,7 +246,7 @@ static void test_copy(const nfapi_nr_dl_tti_request_t *msg) free_dl_tti_request(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_rach_indication_test.c b/nfapi/tests/p7/nr_fapi_rach_indication_test.c index 8d0b3a17a1..c5f66b2ee3 100644 --- a/nfapi/tests/p7/nr_fapi_rach_indication_test.c +++ b/nfapi/tests/p7/nr_fapi_rach_indication_test.c @@ -77,7 +77,7 @@ static void test_copy(const nfapi_nr_rach_indication_t *msg) free_rach_indication(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_rx_data_indication_test.c b/nfapi/tests/p7/nr_fapi_rx_data_indication_test.c index 25add80458..c8a79e6123 100644 --- a/nfapi/tests/p7/nr_fapi_rx_data_indication_test.c +++ b/nfapi/tests/p7/nr_fapi_rx_data_indication_test.c @@ -75,7 +75,7 @@ static void test_copy(const nfapi_nr_rx_data_indication_t *msg) free_rx_data_indication(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_slot_indication_test.c b/nfapi/tests/p7/nr_fapi_slot_indication_test.c index 6a49734f74..83b107263d 100644 --- a/nfapi/tests/p7/nr_fapi_slot_indication_test.c +++ b/nfapi/tests/p7/nr_fapi_slot_indication_test.c @@ -52,7 +52,7 @@ static void test_copy(const nfapi_nr_slot_indication_scf_t *msg) free_slot_indication(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_srs_indication_test.c b/nfapi/tests/p7/nr_fapi_srs_indication_test.c index e873c6ef5d..95ba8592b2 100644 --- a/nfapi/tests/p7/nr_fapi_srs_indication_test.c +++ b/nfapi/tests/p7/nr_fapi_srs_indication_test.c @@ -84,7 +84,7 @@ static void test_copy(const nfapi_nr_srs_indication_t *msg) free_srs_indication(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_tx_data_request_test.c b/nfapi/tests/p7/nr_fapi_tx_data_request_test.c index 2fe03b65c0..2c02093fc1 100644 --- a/nfapi/tests/p7/nr_fapi_tx_data_request_test.c +++ b/nfapi/tests/p7/nr_fapi_tx_data_request_test.c @@ -138,7 +138,7 @@ static void test_copy(const nfapi_nr_tx_data_request_t *msg) free_tx_data_request(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_uci_indication_test.c b/nfapi/tests/p7/nr_fapi_uci_indication_test.c index 6b9583a317..e7c35a0ec6 100644 --- a/nfapi/tests/p7/nr_fapi_uci_indication_test.c +++ b/nfapi/tests/p7/nr_fapi_uci_indication_test.c @@ -205,7 +205,7 @@ static void test_copy(const nfapi_nr_uci_indication_t *msg) free_uci_indication(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_ul_dci_request_test.c b/nfapi/tests/p7/nr_fapi_ul_dci_request_test.c index dc7cb4ad8f..1d1278b9dc 100644 --- a/nfapi/tests/p7/nr_fapi_ul_dci_request_test.c +++ b/nfapi/tests/p7/nr_fapi_ul_dci_request_test.c @@ -108,7 +108,7 @@ static void test_copy(const nfapi_nr_ul_dci_request_t *msg) free_ul_dci_request(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/nfapi/tests/p7/nr_fapi_ul_tti_request_test.c b/nfapi/tests/p7/nr_fapi_ul_tti_request_test.c index ed404a98d4..d30a4892ec 100644 --- a/nfapi/tests/p7/nr_fapi_ul_tti_request_test.c +++ b/nfapi/tests/p7/nr_fapi_ul_tti_request_test.c @@ -427,7 +427,7 @@ static void test_copy(const nfapi_nr_ul_tti_request_t *msg) free_ul_tti_request(©); } -int main(int n, char *v[]) +int main() { fapi_test_init(); diff --git a/openair1/PHY/TOOLS/tests/CMakeLists.txt b/openair1/PHY/TOOLS/tests/CMakeLists.txt index 4448422b50..ab38ac8c92 100644 --- a/openair1/PHY/TOOLS/tests/CMakeLists.txt +++ b/openair1/PHY/TOOLS/tests/CMakeLists.txt @@ -23,6 +23,7 @@ target_link_libraries(dft_test minimal_lib shlib_loader SIMU m) add_dependencies(tests dft_test) add_dependencies(dft_test dfts) # trigger build of dfts (shared lib for DFT) add_test(NAME dft_test COMMAND ./dft_test) +set_tests_properties(dft_test PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}") add_executable(test_vector_op test_vector_op.cpp) target_link_libraries(test_vector_op PRIVATE LOG minimal_lib) diff --git a/openair2/E1AP/tests/e1ap_lib_test.c b/openair2/E1AP/tests/e1ap_lib_test.c index 087f90b6e3..1dae75ce4f 100644 --- a/openair2/E1AP/tests/e1ap_lib_test.c +++ b/openair2/E1AP/tests/e1ap_lib_test.c @@ -18,6 +18,7 @@ void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); printf("detected error at %s:%d:%s: %s\n", file, line, function, s); abort(); } diff --git a/openair2/F1AP/tests/f1ap_lib_test.c b/openair2/F1AP/tests/f1ap_lib_test.c index a719a546d2..25a6f1b6b3 100644 --- a/openair2/F1AP/tests/f1ap_lib_test.c +++ b/openair2/F1AP/tests/f1ap_lib_test.c @@ -22,6 +22,7 @@ void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); printf("detected error at %s:%d:%s: %s\n", file, line, function, s); abort(); } diff --git a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp index 29dcba5a7a..54f0a77933 100644 --- a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp +++ b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp @@ -4,6 +4,7 @@ #include "gtest/gtest.h" extern "C" { +#include "common/platform_types.h" #include "openair2/LAYER2/NR_MAC_UE/mac_proto.h" #include "executables/softmodem-common.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" @@ -16,15 +17,26 @@ softmodem_params_t *get_softmodem_params(void) } void nr_mac_rrc_ra_ind(const module_id_t mod_id, bool success) { + UNUSED(mod_id); + UNUSED(success); } void nr_mac_rrc_msg3_ind(const module_id_t mod_id, const int rnti, bool prepare_payload) { + UNUSED(mod_id); + UNUSED(rnti); + UNUSED(prepare_payload); } void nr_mac_rlc_status_ind(uint16_t ue_id, frame_t frame, int n_ch, const logical_chan_id_t *ch, mac_rlc_status_resp_t *ret) { + UNUSED(ue_id); + UNUSED(frame); + UNUSED(n_ch); + UNUSED(ch); + UNUSED(ret); } void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id) { + UNUSED(mod_id); } tbs_size_t nr_mac_rlc_data_req(const module_id_t module_idP, const uint16_t ue_id, @@ -33,6 +45,12 @@ tbs_size_t nr_mac_rlc_data_req(const module_id_t module_idP, const tb_size_t tb_sizeP, char *buffer_pP) { + UNUSED(module_idP); + UNUSED(ue_id); + UNUSED(gnb_flagP); + UNUSED(channel_idP); + UNUSED(tb_sizeP); + UNUSED(buffer_pP); return 0; } void nr_mac_rlc_data_ind(const module_id_t module_idP, @@ -41,26 +59,42 @@ void nr_mac_rlc_data_ind(const module_id_t module_idP, const nr_rlc_data_ind_t *data, int num_data) { + UNUSED(module_idP); + UNUSED(ue_id); + UNUSED(gnb_flagP); + UNUSED(data); + UNUSED(num_data); } void nr_mac_rrc_verification_failed(const module_id_t mod_id) { + UNUSED(mod_id); } bool nr_rlc_activate_srb0(int ue_id, void *data, void (*send_initial_ul_rrc_message)(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data)) { + UNUSED(ue_id); + UNUSED(data); + UNUSED(send_initial_ul_rrc_message); return true; } int nr_rlc_module_init(nr_rlc_op_mode_t mode) { + UNUSED(mode); return 0; } MessageDef *itti_alloc_new_message(task_id_t origin_task_id, instance_t originInstance, MessagesIds message_id) { + UNUSED(origin_task_id); + UNUSED(originInstance); + UNUSED(message_id); return NULL; } int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *message) { + UNUSED(task_id); + UNUSED(instance); + UNUSED(message); return 0; } typedef uint32_t channel_t; @@ -77,10 +111,23 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const uint8_t *pduP, const sdu_size_t pdu_len) { + UNUSED(module_id); + UNUSED(CC_id); + UNUSED(gNB_index); + UNUSED(hfn); + UNUSED(frame); + UNUSED(slot); + UNUSED(rnti); + UNUSED(cellid); + UNUSED(arfcn); + UNUSED(channel); + UNUSED(pduP); + UNUSED(pdu_len); return 0; } bool check_csi_report_consistency(const NR_CSI_MeasConfig_t *meas) { + UNUSED(meas); return true; } void nr_mac_rrc_meas_ind_ue(module_id_t module_id, @@ -90,6 +137,12 @@ void nr_mac_rrc_meas_ind_ue(module_id_t module_id, bool is_neighboring_cell, int rsrp_dBm) { + UNUSED(module_id); + UNUSED(gNB_index); + UNUSED(Nid_cell); + UNUSED(csi_meas); + UNUSED(is_neighboring_cell); + UNUSED(rsrp_dBm); } } #include diff --git a/openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity.cpp b/openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity.cpp index e959373076..a3c2295782 100644 --- a/openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity.cpp +++ b/openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity.cpp @@ -3,6 +3,7 @@ */ #include "benchmark/benchmark.h" extern "C" { +#include "common/platform_types.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_entity_am.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_entity.h" #include "common/utils/LOG/log.h" @@ -13,12 +14,21 @@ extern configmodule_interface_t *uniqCfg; void deliver_sdu(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size) { + UNUSED(deliver_sdu_data); + UNUSED(entity); + UNUSED(buf); + UNUSED(size); } void sdu_successful_delivery(void *sdu_successful_delivery_data, nr_rlc_entity_t *entity, int sdu_id) { + UNUSED(sdu_successful_delivery_data); + UNUSED(entity); + UNUSED(sdu_id); } void max_retx_reached(void *max_retx_reached_data, nr_rlc_entity_t *entity) { + UNUSED(max_retx_reached_data); + UNUSED(entity); } static void BM_nr_rlc_am_entity(benchmark::State &state) diff --git a/openair2/LAYER2/nr_rlc/tests/test.c b/openair2/LAYER2/nr_rlc/tests/test.c index e97091fe92..55cdfe0c79 100644 --- a/openair2/LAYER2/nr_rlc/tests/test.c +++ b/openair2/LAYER2/nr_rlc/tests/test.c @@ -7,6 +7,7 @@ #include "../nr_rlc_entity_um.h" #include "../nr_rlc_entity_tm.h" +#include "common/platform_types.h" #include #include #include @@ -113,6 +114,7 @@ int test[] = { void deliver_sdu_gnb_am(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size) { + UNUSED(deliver_sdu_data); nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity; printf("TEST: GNB: %"PRIu64": deliver SDU size %d [", entity->t_current, size); @@ -122,6 +124,7 @@ void deliver_sdu_gnb_am(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char * void deliver_sdu_gnb_um(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size) { + UNUSED(deliver_sdu_data); nr_rlc_entity_um_t *entity = (nr_rlc_entity_um_t *)_entity; printf("TEST: GNB: %"PRIu64": deliver SDU size %d [", entity->t_current, size); @@ -131,6 +134,7 @@ void deliver_sdu_gnb_um(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char * void deliver_sdu_gnb_tm(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size) { + UNUSED(deliver_sdu_data); nr_rlc_entity_tm_t *entity = (nr_rlc_entity_tm_t *)_entity; printf("TEST: GNB: %"PRIu64": deliver SDU size %d [", entity->t_current, size); @@ -141,6 +145,7 @@ void deliver_sdu_gnb_tm(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char * void successful_delivery_gnb(void *successful_delivery_data, nr_rlc_entity_t *_entity, int sdu_id) { + UNUSED(successful_delivery_data); nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity; printf("TEST: GNB: %"PRIu64": SDU %d was successfully delivered.\n", entity->t_current, sdu_id); @@ -149,6 +154,7 @@ void successful_delivery_gnb(void *successful_delivery_data, void max_retx_reached_gnb(void *max_retx_reached_data, nr_rlc_entity_t *_entity) { + UNUSED(max_retx_reached_data); nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity; printf("TEST: GNB: %"PRIu64": max RETX reached! radio link failure!\n", entity->t_current); @@ -157,6 +163,7 @@ void max_retx_reached_gnb(void *max_retx_reached_data, void deliver_sdu_ue_am(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size) { + UNUSED(deliver_sdu_data); nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity; printf("TEST: UE: %"PRIu64": deliver SDU size %d [", entity->t_current, size); @@ -166,6 +173,7 @@ void deliver_sdu_ue_am(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *b void deliver_sdu_ue_um(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size) { + UNUSED(deliver_sdu_data); nr_rlc_entity_um_t *entity = (nr_rlc_entity_um_t *)_entity; printf("TEST: UE: %"PRIu64": deliver SDU size %d [", entity->t_current, size); @@ -175,6 +183,7 @@ void deliver_sdu_ue_um(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *b void deliver_sdu_ue_tm(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size) { + UNUSED(deliver_sdu_data); nr_rlc_entity_tm_t *entity = (nr_rlc_entity_tm_t *)_entity; printf("TEST: UE: %"PRIu64": deliver SDU size %d [", entity->t_current, size); @@ -185,6 +194,7 @@ void deliver_sdu_ue_tm(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *b void successful_delivery_ue(void *successful_delivery_data, nr_rlc_entity_t *_entity, int sdu_id) { + UNUSED(successful_delivery_data); nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity; printf("TEST: UE: %"PRIu64": SDU %d was successfully delivered.\n", entity->t_current, sdu_id); @@ -193,6 +203,7 @@ void successful_delivery_ue(void *successful_delivery_data, void max_retx_reached_ue(void *max_retx_reached_data, nr_rlc_entity_t *_entity) { + UNUSED(max_retx_reached_data); nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity; printf("TEST: UE: %"PRIu64", max RETX reached! radio link failure!\n", entity->t_current); diff --git a/openair2/LAYER2/nr_rlc/tests/test_nr_rlc_am_entity.cpp b/openair2/LAYER2/nr_rlc/tests/test_nr_rlc_am_entity.cpp index 4abdab03fb..930ce28a42 100644 --- a/openair2/LAYER2/nr_rlc/tests/test_nr_rlc_am_entity.cpp +++ b/openair2/LAYER2/nr_rlc/tests/test_nr_rlc_am_entity.cpp @@ -4,6 +4,7 @@ #include "gtest/gtest.h" extern "C" { +#include "common/platform_types.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_entity_am.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_entity.h" #include "common/utils/LOG/log.h" @@ -16,6 +17,8 @@ int sdu_delivered_count = 0; int sdu_acked_count = 0; void deliver_sdu(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size) { + UNUSED(deliver_sdu_data); + UNUSED(entity); sdu_delivered_count++; char payload[300]; ASSERT_LE(size, sizeof(payload)); @@ -25,12 +28,16 @@ void deliver_sdu(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int void sdu_successful_delivery(void *sdu_successful_delivery_data, nr_rlc_entity_t *entity, int sdu_id) { + UNUSED(sdu_successful_delivery_data); + UNUSED(entity); sdu_acked_count++; std::cout << "SDU " << sdu_id << " acked" << std::endl; } void max_retx_reached(void *max_retx_reached_data, nr_rlc_entity_t *entity) { + UNUSED(max_retx_reached_data); + UNUSED(entity); } TEST(nr_rlc_am_entity, test_init) diff --git a/openair2/RRC/NR/tests/rrc_bearers_test.c b/openair2/RRC/NR/tests/rrc_bearers_test.c index 3a3aa33633..bc45ac591f 100644 --- a/openair2/RRC/NR/tests/rrc_bearers_test.c +++ b/openair2/RRC/NR/tests/rrc_bearers_test.c @@ -15,12 +15,19 @@ #include "common/utils/LOG/log.h" #include "common/5g_platform_types.h" -int nr_rlc_get_available_tx_space(int module_id, int rnti, int drb_id) { return 0; } +int nr_rlc_get_available_tx_space(int module_id, int rnti, int drb_id) +{ + UNUSED(module_id); + UNUSED(rnti); + UNUSED(drb_id); + return 0; +} softmodem_params_t *get_softmodem_params(void) { return NULL; } configmodule_interface_t *uniqCfg = NULL; void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); printf("detected error at %s:%d:%s: %s\n", file, line, function, s); abort(); } diff --git a/openair2/RRC/NR/tests/rrc_cell_management_test.c b/openair2/RRC/NR/tests/rrc_cell_management_test.c index a862718fa5..0379de4562 100644 --- a/openair2/RRC/NR/tests/rrc_cell_management_test.c +++ b/openair2/RRC/NR/tests/rrc_cell_management_test.c @@ -50,6 +50,7 @@ softmodem_params_t *get_softmodem_params(void) void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); printf("detected error at %s:%d:%s: %s\n", file, line, function, s); abort(); } diff --git a/openair2/XNAP/tests/xnap_lib_test.c b/openair2/XNAP/tests/xnap_lib_test.c index 4e160157c3..ca5c354ed2 100644 --- a/openair2/XNAP/tests/xnap_lib_test.c +++ b/openair2/XNAP/tests/xnap_lib_test.c @@ -18,6 +18,7 @@ configmodule_interface_t *uniqCfg = NULL; void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); printf("detected error at %s:%d:%s: %s\n", file, line, function, s); abort(); } diff --git a/openair3/NAS/NR_UE/5GS/tests/nas_lib_test.c b/openair3/NAS/NR_UE/5GS/tests/nas_lib_test.c index 62e9fef5a7..65dea9688d 100644 --- a/openair3/NAS/NR_UE/5GS/tests/nas_lib_test.c +++ b/openair3/NAS/NR_UE/5GS/tests/nas_lib_test.c @@ -21,6 +21,7 @@ configmodule_interface_t *uniqCfg = NULL; void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); printf("detected error at %s:%d:%s: %s\n", file, line, function, s); abort(); } diff --git a/openair3/NGAP/tests/ngap_lib_test.c b/openair3/NGAP/tests/ngap_lib_test.c index 1c3dba50ab..4ff780f06e 100644 --- a/openair3/NGAP/tests/ngap_lib_test.c +++ b/openair3/NGAP/tests/ngap_lib_test.c @@ -20,6 +20,7 @@ void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); printf("detected error at %s:%d:%s: %s\n", file, line, function, s); abort(); } diff --git a/openair3/ocp-gtpu/tests/test_gtp.cpp b/openair3/ocp-gtpu/tests/test_gtp.cpp index 37edd8e535..64d3afd7eb 100644 --- a/openair3/ocp-gtpu/tests/test_gtp.cpp +++ b/openair3/ocp-gtpu/tests/test_gtp.cpp @@ -18,12 +18,15 @@ configmodule_interface_t *uniqCfg; void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); LOG_E(GNB_APP, "error at %s:%d:%s: %s\n", file, line, function, s); abort(); } int nr_rlc_get_available_tx_space(const rnti_t rntiP, const logical_chan_id_t channel_idP) { + UNUSED(rntiP); + UNUSED(channel_idP); abort(); return 0; } @@ -144,6 +147,15 @@ static bool recv_basic_conn_qfi(protocol_ctxt_t *ctxt, const bool rqi, const int pdusession_id) { + UNUSED(ctxt); + UNUSED(flag); + UNUSED(mui); + UNUSED(confirm); + UNUSED(modeP); + UNUSED(sourceL2Id); + UNUSED(destinationL2Id); + UNUSED(rqi); + UNUSED(pdusession_id); EXPECT_EQ(ue_id, 1); // as defined in basic_conn_qfi EXPECT_EQ(qfi, 1); EXPECT_EQ(size, 3); @@ -171,6 +183,14 @@ static bool recv_multi_qfi_same_pdu(protocol_ctxt_t *ctxt, const bool rqi, const int pdusession_id) { + UNUSED(ctxt); + UNUSED(flag); + UNUSED(mui); + UNUSED(confirm); + UNUSED(modeP); + UNUSED(sourceL2Id); + UNUSED(destinationL2Id); + UNUSED(rqi); EXPECT_EQ(ue_id, 7U); EXPECT_EQ(pdusession_id, 9); EXPECT_LT(recv_count_multi_qfi, expected_qfis_multi_qfi_count); @@ -258,6 +278,13 @@ static bool recv_basic_conn(protocol_ctxt_t *ctxt, const uint32_t *sourceL2Id, const uint32_t *destinationL2Id) { + UNUSED(srb_flagP); + UNUSED(rb_idP); + UNUSED(muiP); + UNUSED(confirmP); + UNUSED(modeP); + UNUSED(sourceL2Id); + UNUSED(destinationL2Id); EXPECT_EQ(ctxt->rntiMaybeUEid, 12); // as defined in basic_conn EXPECT_EQ(size, 3); for (int i = 0; i < size; ++i) diff --git a/tests/nr-cuup/CMakeLists.txt b/tests/nr-cuup/CMakeLists.txt index 14ca8db14c..8a5f0f35e9 100644 --- a/tests/nr-cuup/CMakeLists.txt +++ b/tests/nr-cuup/CMakeLists.txt @@ -13,4 +13,5 @@ if(ENABLE_TESTS) COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/nr-cuup-functional-test.sh ${CMAKE_CURRENT_SOURCE_DIR}/load-test.conf WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) + set_tests_properties(nr_cuup_functional_test PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}") endif()