otrv4 / libotr-ng

A new implementation of OTR with support for version 4. This is a mirror of https://bugs.otr.im/otrv4/libotr-ng
Other
43 stars 9 forks source link

Random failure of some tests #30

Closed claucece closed 7 years ago

claucece commented 7 years ago

Locally, on OS, the 'test_fixtures' sometimes fails, while comparing root keys.

'do_ake_fixture: assertion failed: (alice->keys->current->root_key ==  bob->keys->current->root_key)'. 

Might be related to manually setting 'our_dh->pub' in 'identity_message_in_waiting_auth_r' test or to removing ratchet id.

claucece commented 7 years ago

Maybe related:

On CI, sometimes this fails:

ERROR:test_api.c:181:test_dh_key_rotation: assertion failed: (err == OTR4_SUCCESS)
claucece commented 7 years ago

UPDATE: looks like it is either related with ratchet id or related with issue #31 Also, in test test_invalid_auth_i_msg_in_not_waiting_auth_i, at some point the macs are not the same. Might be related.

claucece commented 7 years ago

Found again at the 30 time I run the tests:

ERROR:./test_fixtures.h:184:do_ake_fixture: assertion failed: (alice->keys->current->root_key ==  bob->keys->current->root_key)
EXPECTED (0x7f8ad9e00180): 
0xaf, 0xd8, 0xd1, 0x45, 0x22, 0x01, 0xfd, 0x1d, 
0xd3, 0x90, 0x08, 0x59, 0x5b, 0x52, 0xe9, 0x76, 
0x66, 0xe7, 0x11, 0x1d, 0x30, 0x97, 0xa5, 0xaa, 
0x69, 0xbb, 0xbb, 0xd8, 0xb0, 0xd4, 0x0f, 0x0b, 
0xa7, 0xde, 0x8c, 0x0e, 0x74, 0x72, 0x03, 0x85, 
0xac, 0xa1, 0x19, 0xd8, 0x53, 0x9f, 0x1e, 0x43, 
0x23, 0x2e, 0x71, 0x37, 0x96, 0x1d, 0x56, 0xcf, 
0xcf, 0x1b, 0xe4, 0x25, 0x6b, 0xa4, 0x4c, 0x46, 
ACTUAL (0x7f8ad9e01f80): 
0x68, 0x86, 0xfa, 0x0e, 0x97, 0xed, 0xc6, 0xa5, 
0x10, 0x88, 0x31, 0x77, 0x01, 0xc6, 0x35, 0x65, 
0x74, 0x40, 0x93, 0x6b, 0xdd, 0x6a, 0x83, 0x07, 
0x69, 0x8d, 0x51, 0x9f, 0x61, 0x80, 0x79, 0xce, 
0x4d, 0xeb, 0x5d, 0x73, 0x73, 0x65, 0x6f, 0x99, 
0x9a, 0xdb, 0xcc, 0x02, 0x2e, 0xf2, 0x55, 0xb6, 
0x5c, 0xd7, 0xc4, 0x09, 0x36, 0x12, 0x14, 0x4d, 
0x19, 0xf8, 0xc2, 0xc0, 0x48, 0xad, 0x18, 0xed,
claucece commented 7 years ago

Apparently, Idk since when, some test randomly fail locally and on the CI:

ERROR:./test_fixtures.h:120:void do_ake_fixture(otrv4_t *, otrv4_t *): assertion failed: (otrv4_receive_message(response_to_bob, response_to_alice->to_send, alice) == OTR4_SUCCESS) ERROR:./test_identity_message.c:139:test_dake_identity_message_valid: assertion failed: (valid_dake_identity_message(identity_message)) ERROR:./test_client.c:138:test_client_api: assertion failed: (ignore) ERROR:./test_client.c:922:test_valid_identity_msg_in_waiting_auth_r_higher: assertion failed: (ignore) ERROR:./test_client.c:510:test_valid_identity_msg_in_waiting_auth_i: assertion failed: (ignore) ERROR:./test_client.c:720:test_valid_identity_msg_in_waiting_auth_r_lower: assertion failed: (!alices_auth_r) ERROR:./test_client.c:1142:test_client_sends_fragmented_message: assertion failed (todisplay == message): (NULL == "We should fragment when is needed”) ERROR:./test_client.c:334:test_conversation_with_multiple_locations: assertion failed: (todisplay)

claucece commented 7 years ago

After testing since f4b5ad331e769745f08b2fd432fa3f4d6858cd2b, it still fails:

test_client.c:922:test_valid_identity_msg_in_waiting_auth_r_higher: assertion failed: (ignore) 
test_client.c:510:test_valid_identity_msg_in_waiting_auth_i: assertion failed: (ignore)
test_fixtures.h:185:do_ake_fixture: assertion failed: (alice->keys->current->root_key == bob->keys->current->root_key)
claucece commented 7 years ago

This possibly related to #39

natalieesk commented 7 years ago

Most flaky tests are now fixed, this seems to be the only one that remains: ERROR:./test_client.c:720:test_valid_identity_msg_in_waiting_auth_r_lower: assertion failed: (!alices_auth_r)

Usually need to run the tests at least 200 times to see this failing.