78bfe2d439
feat: Fix MUC tests to use stbbr_for_presence_to
...
CI Code / Check spelling (pull_request) Successful in 22s
CI Code / Check coding style (pull_request) Successful in 41s
CI Code / Linux (arch) (pull_request) Failing after 58s
CI Code / Linux (debian) (pull_request) Failing after 1m8s
CI Code / Linux (ubuntu) (pull_request) Failing after 1m9s
- Update MUC tests to use stbbr_received instead of stbbr_last_received
- Replace stbbr_for_id with stbbr_for_presence_to for MUC join responses
- Add stabber include path to Makefile.am
- Update stabber submodule
- 45 functional tests now passing
2025-12-06 15:06:28 +03:00
1437aedb2a
fix: Fix stabber depth tracking and enable all 70 functional tests
...
CI Code / Check coding style (pull_request) Successful in 37s
CI Code / Linux (arch) (pull_request) Failing after 57s
CI Code / Linux (debian) (pull_request) Failing after 1m10s
CI Code / Linux (ubuntu) (pull_request) Failing after 1m13s
CI Code / Check spelling (pull_request) Successful in 9m22s
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)
2025-12-02 19:43:03 +03:00
6f61e5b26c
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
2025-12-02 18:22:23 +03:00
1305c59b5e
refactor(tests): migrate functional tests to content-based stubbing and enable unconditionally
2025-11-26 18:26:02 +03:00
Steffen Jaeckel
988d3663d1
Introduce tests/prof_cmocka.h
...
As 9f2abc75 accidentally got the ordering of some of the includes wrong,
I decided to propose my initial solution again.
Additional to that, I've opened a MR against CMocka to solve this on
their side, since I believe that the current way this is done is not
sustainable [0].
[0] https://gitlab.com/cmocka/cmocka/-/merge_requests/91
Fixes: 9f2abc75 ("Fix tests with gcc15 (uintptr_t)")
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu >
CProof note: our new tests need to also be updated.
2025-09-10 14:11:03 +02:00
ike08
d35a7a7f7e
Refactor tests to use the new cmocka test runner
...
## Summary
Fixes https://github.com/profanity-im/profanity/issues/1907
Update functional and unit test code to comply with the current cmocka test runner.
## Changes
- `UnitTest` struct to `CMUnitTest` struct
- `unit_test()` macro to `cmocka_unit_test(f)` macro
- `unit_test_setup_teardown()` macro to `cmocka_unit_test_setup_teardown` macro
- `run_tests()` macro to `cmocka_run_group_tests()` function
- Setup and teardown functions return `int` instead of `void`
## Testing
### Unit Tests
`make check`
### Functional Tests
I did not compile or run functional tests because they are *shelved* for now.
### Valgrind
I'm not entirely sure how to fun Valgrind in this case. I did not do fancy memory management, so it should be fine.
2023-11-01 18:30:08 -06:00
John Hernandez
5b8b9074a2
Add nickname support for /roster remove
...
Add support of name/nickname instead of only JID for `/roster remove` command.
Add tests for it as well.
2023-04-13 16:41:21 +02:00
James Booth
ee664bf1d2
Add room /me functional tests
2018-04-21 20:40:11 +01:00
James Booth
f189dbc687
Only send ping requests to client that support it
2017-06-16 00:59:21 +01:00
James Booth
6511d61b13
Show message when server does not support ping
2017-06-15 23:27:30 +01:00
James Booth
2b7894ccff
Remove status from cl_ev_presence_send
...
fixes #888
2017-01-15 23:59:31 +00:00
James Booth
609d05366c
Use server features for account muc service
...
issue #878
2016-11-20 02:09:34 +00:00
James Booth
fca59a3110
log_info on private carbons
2016-08-28 17:27:26 +01:00
James Booth
a978bb12bf
Send receipt request only when receiver supports feature
...
issue #829
2016-08-18 22:53:23 +01:00
James Booth
9b177a9e01
Removed #AX_PREFIX_CONFIG_H
2016-03-31 21:05:02 +01:00
James Booth
41fe8c22b1
Added C plugin code from plugins branch
2016-02-14 22:28:55 +00:00
James Booth
e1e0fda8b3
Call UI disconnect functions before disconnecting with /disconnect
...
fixes #703
2016-01-05 01:30:32 +00:00
James Booth
69ac809776
Added functional tests for /console command
2015-12-30 00:32:52 +00:00
James Booth
377a63d038
Uncommented functional tests
2015-12-22 00:45:15 +00:00
James Booth
6303e0e25a
Added chat message functional tests
2015-12-22 00:27:37 +00:00
James Booth
94169705b5
Added functional test for muc console message
2015-12-20 03:11:02 +00:00
James Booth
c61e9d80ea
Added more muc functional tests
2015-12-20 02:42:11 +00:00
James Booth
87b4d7cbab
Added muc functional tests
2015-12-20 02:13:01 +00:00
James Booth
406b821b35
Show software version result in current window
2015-08-06 01:56:52 +01:00
James Booth
ac3e7dd9e8
Handle software version requests for gateways that return from domainpart
2015-08-05 00:48:50 +01:00
James Booth
2a92169351
Use id handler for software version requests, handle errors
2015-08-05 00:26:29 +01:00
James Booth
de747e3d46
Added software version request tests
2015-08-04 23:43:19 +01:00
James Booth
2cb2f83ce3
Added test for missing resource on presence
2015-08-04 23:22:43 +01:00
James Booth
f9a7e35001
Added id attributes to roster queries
...
fixes #596
2015-07-22 22:48:37 +01:00
James Booth
d40998c4af
Added reciept send functional test
2015-07-20 22:35:14 +01:00
James Booth
d54cbf126a
Added receipt request functional test
2015-07-20 22:21:29 +01:00
James Booth
52e2917b5d
Added functional test macro
2015-07-20 22:00:51 +01:00
James Booth
bdcc0ddbf8
Added carbon message tests
2015-07-20 21:36:58 +01:00
James Booth
f3326bf105
Added carbons enable/disable tests
2015-07-15 00:23:46 +01:00
James Booth
5e324e407f
Added carbons command functional test
2015-07-05 17:29:33 +01:00
James Booth
a48b9fcec2
Tidied functional tests
2015-06-13 19:41:11 +01:00
James Booth
68ed20f10d
Moved all tests to tests folder
2015-06-12 23:53:30 +01:00