fix: Fix functional tests infrastructure and enable connect/ping tests

Fix multiple issues preventing functional tests from running:

Stabber submodule:
- Fix XMPP stream parsing for multiple stanzas per TCP packet
- Add virtual wrapper element for Expat to handle multiple roots
- Support non-<query/> IQ payloads (ping, blocklist, etc.)
- Relax stanza matching to allow extra attributes in received

Profanity changes:
- cmd_defs.c: Increase /connect args limit from 7 to 9
- proftest.c: Add startup delay, use legacy auth, debug logging
- test_ping.c: Use wildcard IDs, regex matching, timing fixes
- functionaltests.c: Enable connect and ping test suites

Results: 9/10 tests passing

TODO:
- [ ] Fix ping_server test (disco#info response handling)
- [ ] Uncomment and fix remaining test suites (rooms, message,
      receipts, chat_session, presence, etc.)
- [ ] Remove STBBR_LOGDEBUG after stabilization
- [ ] Review timing/sleep() calls for optimization
This commit is contained in:
2025-12-02 18:22:23 +03:00
parent c628c2acd5
commit 6f61e5b26c
5 changed files with 55 additions and 79 deletions

View File

@@ -27,16 +27,16 @@ int main(int argc, char* argv[]) {
const struct CMUnitTest all_tests[] = {
PROF_FUNC_TEST(connect_jid_requests_roster),
// PROF_FUNC_TEST(connect_jid_sends_presence_after_receiving_roster),
// PROF_FUNC_TEST(connect_jid_requests_bookmarks),
// PROF_FUNC_TEST(connect_bad_password),
// PROF_FUNC_TEST(connect_shows_presence_updates),
PROF_FUNC_TEST(connect_jid_sends_presence_after_receiving_roster),
PROF_FUNC_TEST(connect_jid_requests_bookmarks),
PROF_FUNC_TEST(connect_bad_password),
PROF_FUNC_TEST(connect_shows_presence_updates),
// PROF_FUNC_TEST(ping_server),
// PROF_FUNC_TEST(ping_server_not_supported),
// PROF_FUNC_TEST(ping_responds_to_server_request),
// PROF_FUNC_TEST(ping_jid),
// PROF_FUNC_TEST(ping_jid_not_supported),
PROF_FUNC_TEST(ping_server),
PROF_FUNC_TEST(ping_server_not_supported),
PROF_FUNC_TEST(ping_responds_to_server_request),
PROF_FUNC_TEST(ping_jid),
PROF_FUNC_TEST(ping_jid_not_supported),
// PROF_FUNC_TEST(rooms_query),