aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Expand)AuthorAgeFilesLines
* Only init solanum once in tests/sasl_abort1.c•••Calling solanum_main multiple times results in loading every core/autoload module multiple times (because the check for "is the module already loaded" always returns "no" due to solanum_main clearing the list of loaded modules before attempting the load). Init only once, and use other code to ensure that UIDs are consistent instead by resetting the counter and ensuring we free the clients with the old UIDs at the end of each test run. HEAD mainGravatar Ryan Schmidt13 days1-11/+9
* Add sendto_list_local_* and sendto_monitor_with_capability•••These are needed for METADATA support, and sendto_monitor was refactored into a common sendto_list_local_internal method used by all of the newly-added functions as well. Test cases were also added to excercise the new functions. Gravatar Ryan Schmidt13 days1-0/+358
* Clean up outgoing_response_info on parse end•••Failing to set outgoing_response_info to NULL after finishing parsing a command means any future commands that do *not* have a label tag will incorrectly inherit that labeled response context. This can cause, among other things, crashes when sending an unlabeled remote command after a labeled remote command. Also add a regression test for this behaviour. Gravatar Ryan Schmidt2026-07-041-0/+18
* Address review commentsGravatar Ryan Schmidt2026-07-031-1/+1
* Add tests for labeled-responseGravatar Ryan Schmidt2026-07-034-0/+774
* Avoid spurious printfs in sasl_abort1•••The TAP protocol doesn't allow extra stdout lines unless they're commented (which these were not), and I don't see the value in printing out every line we're munching, so instead use the new drain_client_sendq function introduced in the previous commit to empty out the client's sendq rather than these printf while loops. Gravatar Ryan Schmidt2026-07-031-7/+2
* Test utility fixes and additions•••- Add helper method to drain a client's sendq without asserting on any of its lines - Add helper method to fetch a dictionary by name, as these are typically static linkage but could be useful for inspection or manipulation in tests - Add helper method to run an event by name, as these are typically static linkage but could be useful to run during tests - Make the cleanup_remote functions work properly by exiting the correct client with the correct parameters - Add clients created by text utilities to relevant tracking variables - New helper methods to create clients with IDs - Fix return value of get_client_sendq to always be a char * (some cases previously returned const char *) Gravatar Ryan Schmidt2026-07-032-12/+55
* Use posix-compliant shell syntax•••Local dev env had /bin/sh aliased to /bin/bash but CI runs on Ubuntu where /bin/sh is dash, and lacks array support. Debian is similar in this regard, so ensure that the script works across any posix-compliant shell rather than using bash-isms. Gravatar Ryan Schmidt2026-07-031-6/+6
* Fix meson test•••A new custom build target sets up the runtime dir the way the testsuite expects it so that it can run properly. Also fix the help script as it was trying to treat a file as a symlink when it wasn't which broke the new build target. Tests now also properly use the TAP protocol in the meson build file, and fix a segfault in the send1 tests that passes NULL to a function that previously assumed that NULL would not be passed. Gravatar Ryan Schmidt2026-07-032-1/+51
* build: add Meson buildsystemGravatar Valentin Lorentz2026-03-171-0/+62
* Adjust unsigned int -> uint64_t for all caps•••The previous commit addressed the issue with (most) function signatures, but forgot to update the caps themselves to be 64-bit. This fixes that, and finishes the remaining overlooked function signatures. Gravatar Ryan Schmidt2026-03-172-4/+4
* Apply review suggestions•••Also made full use of the Set/Clear macros across the codebase so there's fewer places to touch in the future if changes are needed. Gravatar Ryan Schmidt2026-03-171-149/+147
* Separate client vs server caps•••Instead of overloading the same field in a LocalUser, have separate fields for client caps vs server caps. While only one of these will ever be nonzero, it reduces error by making it explicit which set of caps is being checked. IsCapable and friends have been split as well, to IsClientCapable and IsServerCapable. Finally, both fields have been updated to uint64_t (server caps were approaching the current limit) and all APIs that reference caps updated to uint64_t as well (no more signed/unsigned mismatches). Gravatar Ryan Schmidt2026-03-172-165/+157
* Address review comments•••- Remove static qualifier from a string that didn't need it - Add some tests for trailing params with a leading colon as data to ensure they are parsed/unparsed correctly Gravatar Ryan Schmidt2025-10-102-0/+38
* Update tests•••A number of tests needed to be updated to account for the fact that tags are allowed to be up to 8191 bytes (or 4094 bytes for the client-specified portion or server-specified portion individually). The numbers in these tests were updated, and in some cases we now test both server and client tags to ensure consistent behavior between both types. Gravatar Ryan Schmidt2025-10-104-284/+1028
* tests/send1: we don't add tags to remote messagesGravatar Ed Kellett2025-10-101-21/+21
* tests/send1: @time is sent remotely nowGravatar Ed Kellett2025-10-101-1/+1
* tests/serv_connect1: use proper function prototype for rb_connect_tcp (#457)•••GCC 15 fails to compile this unit, erroring out on providing 6 arguments to a function that is declared to take none. Reported-By: Unit193Gravatar Aaron Jones2025-07-201-1/+3
* GitHub CI Workflow: Bump OS and compiler versions (#447)•••* GitHub CI Workflow: Bump OS and compiler versions * CI: fix for clang 18/19 - Don't enable -Werror during the execution of ./configure and drop -Wunused-value from --enable-warnings - librb/src/crypt.c: remove old-style function decls - rb_dictionary: define type of arguments, fix callees - rb_radixtree: fix spurious out-of-bounds diagnostic Co-authored-by: Doug Freed <dwfreed@mtu.edu>Gravatar Aaron Jones2025-02-251-1/+1
* Remove WebSocket supportGravatar Aaron Jones2024-06-123-3/+0
* m_sasl: Remove implicit abort on registration•••This doesn't make sense in a world where post-registration SASL is allowed, and should fix one case of an annoying login desync that's seen in the real world. Specifically, when a client sends its final AUTHENTICATE and Atheme receives it, it sends an SVSLOGIN for that client. If the client sends us its CAP END *before* we see the SVSLOGIN, the implicit abort will try to abort the SASL session that's already succeeded. Atheme interprets this as an instruction to forget about the successful SASL session; you'll connect unidentified. But it's already sent SVSLOGIN, which will log the client in ircd-side, causing ircd and services views to differ until the user authenticates again manually. I think allowing a SASL session to be aborted when it has already succeeded is an Atheme bug, and it can still be triggered without this change. But our behaviour here seems silly anyway. Gravatar Ed Kellett2022-10-061-22/+9
* valid_temp_time: more simplification and test fixesGravatar Doug Freed2022-06-201-1/+5
* valid_temp_time: simplify/correct overflow check•••the logic for trying to detect the maximum value of time_t was broken; since we target a lower maximum time anyway, just use that for the overflow check Gravatar Ed Kellett2022-06-201-3/+2
* Test some edge cases of valid_temp_timeGravatar Ed Kellett2022-04-131-0/+33
* Add tests for valid_temp_timeGravatar Ed Kellett2022-03-062-0/+53
* tests: chase listener refactor changesGravatar Ariadne Conill2021-07-311-1/+0
* Remove Windows supportGravatar jailbird7772021-07-303-33/+9
* privilegeset_add_privs: append rather than replaceGravatar Ed Kellett2021-03-011-0/+18
* privilegeset_diff: return things in a structGravatar Ed Kellett2021-03-011-39/+28
* Add tests for privsetsGravatar Ed Kellett2021-03-012-0/+168
* chmode: centralise + test mode limits (#94)Gravatar Ed Kellett2021-01-261-0/+36
* Add some tests for multilineGravatar Ed Kellett2020-11-123-0/+171
* tests: clean *.db, *.log•••Co-authored-by: Unit 193 <unit193@unit193.net> Gravatar Ed Kellett2020-11-101-0/+1
* Autogenerate tests/runtime/modulesGravatar Ed Kellett2020-11-09147-146/+7
* tests: autogenerate TESTSGravatar Ed Kellett2020-11-092-12/+6
* tests: cleanup .gitignoreGravatar Ed Kellett2020-11-091-0/+13
* tests: implicitly link *_util.c into every testGravatar Ed Kellett2020-11-091-15/+3
* Test chmode parsingGravatar Ed Kellett2020-11-084-0/+124
* Mark fake test clients, don't assert they're realGravatar Ed Kellett2020-11-011-0/+2
* Fix a corner case of superset matching•••The algorithm we're using gets stuck if it has a ? and can only see a * to feed to it, even if it could skip over that * and consume a character following it. Remedy this by rearranging the input so * always precedes ? in runs of wildcards, so when we're matching ? we know we can skip things. Gravatar Ed Kellett2020-10-311-0/+23
* Add (some failing) tests for mask matchingGravatar Ed Kellett2020-10-313-0/+77
* Implement the solanum.chat/identify-msg vendor capGravatar Ed Kellett2020-10-161-0/+1
* Innovation by sedGravatar Ed Kellett2020-10-151-2/+2
* Merge pull request #355 from edk0/kline-cidr•••Improve [kd]line handling of invalid IP-like masksGravatar Aaron Jones2020-08-063-0/+221
|\
| * Add tests for parse_netmaskGravatar Ed Kellett2020-07-263-0/+221
* | Test sendto_channel_local_priv not ONLY_OPERSGravatar Ed Kellett2020-08-042-5/+7
|/
* Merge pull request #345 from edk0/alias•••m_alias: Preserve protocol framing charactersGravatar Aaron Jones2020-07-071-0/+45
|\
| * m_alias: Preserve protocol framing charactersGravatar Ed Kellett2020-07-051-0/+45
* | Add tests for opmod_send_statusmsgGravatar Ed Kellett2020-07-061-4/+132
|/
* Merge pull request #319 from edk0/invite-notify•••Fix invite-notify and move it to an extensionGravatar Aaron Jones2020-05-011-85/+85
|\