CentaurusInfra / mizar

Mizar – Experimental, High Scale and High Performance Cloud Network https://mizar.readthedocs.io
https://mizar.readthedocs.io
GNU General Public License v2.0
112 stars 50 forks source link

Mizar unittests are not passing #465

Open Hong-Chang opened 3 years ago

Hong-Chang commented 3 years ago

In Mizar, to execute unit tests, the command is "make run_unittests".

In dev-next branch, after run "make run_unittests", gets following result: [ FAILED ] test_trn_cli_delete_agent_network_policy_protocol_port_subcmd [==========] 31 test(s) run. [ PASSED ] 21 test(s). [ FAILED ] 10 test(s), listed below: [ FAILED ] test_trn_cli_load_transit_subcmd [ FAILED ] test_trn_cli_load_agent_subcmd [ FAILED ] test_trn_cli_update_transit_network_policy_subcmd [ FAILED ] test_trn_cli_update_agent_network_policy_subcmd [ FAILED ] test_trn_cli_delete_transit_network_policy_subcmd [ FAILED ] test_trn_cli_delete_agent_network_policy_subcmd [ FAILED ] test_trn_cli_update_transit_network_policy_protocol_port_subcmd [ FAILED ] test_trn_cli_update_agent_network_policy_protocol_port_subcmd [ FAILED ] test_trn_cli_delete_transit_network_policy_protocol_port_subcmd [ FAILED ] test_trn_cli_delete_agent_network_policy_protocol_port_subcmd

10 FAILED TEST(S)

================================================================= ==931026==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 1 object(s) allocated from:

0 0x55c7f9a90a65 in __interceptor_malloc (/home/ubuntu/go/src/k8s.io/mizar/build/tests/test_cli+0x24a65)

#1 0x55c7f9aed942 in cJSON_New_Item src/extern/cJSON.c:214
#2 0x55c7f9aed942 in cJSON_ParseWithOpts src/extern/cJSON.c:1029
#3 0x55c7f9aed942 in cJSON_Parse src/extern/cJSON.c:1092
#4 0x55c7f9ad3e07 in trn_cli_parse_json src/cli/trn_cli_common.c:29
#5 0x55c7f9add107 in trn_cli_delete_transit_network_policy_protocol_port_subcmd src/cli/trn_cli_network_policy.c:588
#6 0x55c7f9abfc8c in test_trn_cli_delete_transit_network_policy_protocol_port_subcmd src/cli/test/test_cli.c:3014
#7 0x7fe901a52c17  (/usr/lib/x86_64-linux-gnu/libcmocka.so.0+0x4c17)

......

The tips to run single unit test:

clu2xlu commented 3 years ago

@phudtran this commit https://github.com/CentaurusInfra/mizar/commit/fcd97a0d162dda570a99b2abf92e3c71e646346d caused failure for: [ FAILED ] test_trn_cli_load_transit_subcmd [ FAILED ] test_trn_cli_load_agent_subcmd