From 1437aedb2a867b701925e8c086578dbca453569f Mon Sep 17 00:00:00 2001 From: "jabber.developer2" Date: Tue, 2 Dec 2025 19:43:03 +0300 Subject: [PATCH] fix: Fix stabber depth tracking and enable all 70 functional tests Stabber changes: - Reset XML parser depth counter on init to fix stanza parsing - Properly track depth for virtual wrapper element - Add debug logging for stanza verification Test changes: - Enable all 70 functional tests (was only 10) - Current status: 40 passing, 30 failing Known issues: - Presence status tests fail (stanzas not received) - MUC tests fail (complex protocol) - ping_server fails (disco#info handling) --- external/stabber | 2 +- tests/functionaltests/functionaltests.c | 120 ++++++++++++------------ 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/external/stabber b/external/stabber index 14b664f4..0c38ca0c 160000 --- a/external/stabber +++ b/external/stabber @@ -1 +1 @@ -Subproject commit 14b664f4c74b7feb3204ac7128b3d22e12f44721 +Subproject commit 0c38ca0c5042e89307f891de3c0ed2ac35b7f338 diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c index 222f33e4..ea957e49 100644 --- a/tests/functionaltests/functionaltests.c +++ b/tests/functionaltests/functionaltests.c @@ -38,74 +38,74 @@ int main(int argc, char* argv[]) { PROF_FUNC_TEST(ping_jid), PROF_FUNC_TEST(ping_jid_not_supported), - // PROF_FUNC_TEST(rooms_query), + PROF_FUNC_TEST(rooms_query), - // PROF_FUNC_TEST(presence_away), - // PROF_FUNC_TEST(presence_away_with_message), - // PROF_FUNC_TEST(presence_online), - // PROF_FUNC_TEST(presence_online_with_message), - // PROF_FUNC_TEST(presence_xa), - // PROF_FUNC_TEST(presence_xa_with_message), - // PROF_FUNC_TEST(presence_dnd), - // PROF_FUNC_TEST(presence_dnd_with_message), - // PROF_FUNC_TEST(presence_chat), - // PROF_FUNC_TEST(presence_chat_with_message), - // PROF_FUNC_TEST(presence_set_priority), - // PROF_FUNC_TEST(presence_includes_priority), - // PROF_FUNC_TEST(presence_keeps_status), - // PROF_FUNC_TEST(presence_received), - // PROF_FUNC_TEST(presence_missing_resource_defaults), + PROF_FUNC_TEST(presence_away), + PROF_FUNC_TEST(presence_away_with_message), + PROF_FUNC_TEST(presence_online), + PROF_FUNC_TEST(presence_online_with_message), + PROF_FUNC_TEST(presence_xa), + PROF_FUNC_TEST(presence_xa_with_message), + PROF_FUNC_TEST(presence_dnd), + PROF_FUNC_TEST(presence_dnd_with_message), + PROF_FUNC_TEST(presence_chat), + PROF_FUNC_TEST(presence_chat_with_message), + PROF_FUNC_TEST(presence_set_priority), + PROF_FUNC_TEST(presence_includes_priority), + PROF_FUNC_TEST(presence_keeps_status), + PROF_FUNC_TEST(presence_received), + PROF_FUNC_TEST(presence_missing_resource_defaults), - // PROF_FUNC_TEST(message_send), - // PROF_FUNC_TEST(message_receive_console), - // PROF_FUNC_TEST(message_receive_chatwin), + PROF_FUNC_TEST(message_send), + PROF_FUNC_TEST(message_receive_console), + PROF_FUNC_TEST(message_receive_chatwin), - // PROF_FUNC_TEST(sends_message_to_barejid_when_contact_offline), - // PROF_FUNC_TEST(sends_message_to_barejid_when_contact_online), - // PROF_FUNC_TEST(sends_message_to_fulljid_when_received_from_fulljid), - // PROF_FUNC_TEST(sends_subsequent_messages_to_fulljid), - // PROF_FUNC_TEST(resets_to_barejid_after_presence_received), - // PROF_FUNC_TEST(new_session_when_message_received_from_different_fulljid), + PROF_FUNC_TEST(sends_message_to_barejid_when_contact_offline), + PROF_FUNC_TEST(sends_message_to_barejid_when_contact_online), + PROF_FUNC_TEST(sends_message_to_fulljid_when_received_from_fulljid), + PROF_FUNC_TEST(sends_subsequent_messages_to_fulljid), + PROF_FUNC_TEST(resets_to_barejid_after_presence_received), + PROF_FUNC_TEST(new_session_when_message_received_from_different_fulljid), - // PROF_FUNC_TEST(send_enable_carbons), - // PROF_FUNC_TEST(connect_with_carbons_enabled), - // PROF_FUNC_TEST(send_disable_carbons), - // PROF_FUNC_TEST(receive_carbon), - // PROF_FUNC_TEST(receive_self_carbon), - // PROF_FUNC_TEST(receive_private_carbon), + PROF_FUNC_TEST(send_enable_carbons), + PROF_FUNC_TEST(connect_with_carbons_enabled), + PROF_FUNC_TEST(send_disable_carbons), + PROF_FUNC_TEST(receive_carbon), + PROF_FUNC_TEST(receive_self_carbon), + PROF_FUNC_TEST(receive_private_carbon), - // PROF_FUNC_TEST(send_receipt_request), - // PROF_FUNC_TEST(send_receipt_on_request), - // PROF_FUNC_TEST(does_not_send_receipt_request_to_barejid), - // PROF_FUNC_TEST(sends_new_item), - // PROF_FUNC_TEST(sends_new_item_nick), - // PROF_FUNC_TEST(sends_remove_item), - // PROF_FUNC_TEST(sends_remove_item_nick), - // PROF_FUNC_TEST(sends_nick_change), + PROF_FUNC_TEST(send_receipt_request), + PROF_FUNC_TEST(send_receipt_on_request), + PROF_FUNC_TEST(does_not_send_receipt_request_to_barejid), + PROF_FUNC_TEST(sends_new_item), + PROF_FUNC_TEST(sends_new_item_nick), + PROF_FUNC_TEST(sends_remove_item), + PROF_FUNC_TEST(sends_remove_item_nick), + PROF_FUNC_TEST(sends_nick_change), - // PROF_FUNC_TEST(send_software_version_request), - // PROF_FUNC_TEST(display_software_version_result), - // PROF_FUNC_TEST(shows_message_when_software_version_error), - // PROF_FUNC_TEST(display_software_version_result_when_from_domainpart), - // PROF_FUNC_TEST(show_message_in_chat_window_when_no_resource), - // PROF_FUNC_TEST(display_software_version_result_in_chat), + PROF_FUNC_TEST(send_software_version_request), + PROF_FUNC_TEST(display_software_version_result), + PROF_FUNC_TEST(shows_message_when_software_version_error), + PROF_FUNC_TEST(display_software_version_result_when_from_domainpart), + PROF_FUNC_TEST(show_message_in_chat_window_when_no_resource), + PROF_FUNC_TEST(display_software_version_result_in_chat), - // PROF_FUNC_TEST(sends_room_join), - // PROF_FUNC_TEST(sends_room_join_with_nick), - // PROF_FUNC_TEST(sends_room_join_with_password), - // PROF_FUNC_TEST(sends_room_join_with_nick_and_password), - // PROF_FUNC_TEST(shows_role_and_affiliation_on_join), - // PROF_FUNC_TEST(shows_subject_on_join), - // PROF_FUNC_TEST(shows_history_message), - // PROF_FUNC_TEST(shows_occupant_join), - // PROF_FUNC_TEST(shows_message), - // PROF_FUNC_TEST(shows_me_message_from_occupant), - // PROF_FUNC_TEST(shows_me_message_from_self), - // PROF_FUNC_TEST(shows_all_messages_in_console_when_window_not_focussed), - // PROF_FUNC_TEST(shows_first_message_in_console_when_window_not_focussed), - // PROF_FUNC_TEST(shows_no_message_in_console_when_window_not_focussed), + PROF_FUNC_TEST(sends_room_join), + PROF_FUNC_TEST(sends_room_join_with_nick), + PROF_FUNC_TEST(sends_room_join_with_password), + PROF_FUNC_TEST(sends_room_join_with_nick_and_password), + PROF_FUNC_TEST(shows_role_and_affiliation_on_join), + PROF_FUNC_TEST(shows_subject_on_join), + PROF_FUNC_TEST(shows_history_message), + PROF_FUNC_TEST(shows_occupant_join), + PROF_FUNC_TEST(shows_message), + PROF_FUNC_TEST(shows_me_message_from_occupant), + PROF_FUNC_TEST(shows_me_message_from_self), + PROF_FUNC_TEST(shows_all_messages_in_console_when_window_not_focussed), + PROF_FUNC_TEST(shows_first_message_in_console_when_window_not_focussed), + PROF_FUNC_TEST(shows_no_message_in_console_when_window_not_focussed), - // PROF_FUNC_TEST(disconnect_ends_session), + PROF_FUNC_TEST(disconnect_ends_session), }; return cmocka_run_group_tests(all_tests, NULL, NULL);