about summary refs log tree commit diff
path: root/src/testsuite
AgeCommit message (Collapse)Author
2024-04-13Test suite: Correctly test for LOGNAME and USERAlexander Barton
2024-04-13Test suite: Don't use "pgrep -u" when LOGNAME and USER are not setAlexander Barton
Thanks for reporting this on IRC, luca!
2024-04-13Test suite: Use $USER in getpid.sh when $LOGNAME is not setAlexander Barton
The LOGNAME environment variable is not set in GitHub "actions", for example ...
2024-04-05Test suite: wait for ERROR message on QUITAlexander Barton
Wait for the "ERROR :Closing connection" message sent by ngIRCd when handling the QUIT command, do not wait for "Connection closed" which is actually output by the telnet(1) command and is implementation dependant! For example, on Haiku OS, this is not always(!) echoed (the command seems to hang sometimes?) which results in unpredictable failures in the test suite ...
2024-04-05Test suite: simplify and enhance getpid.shAlexander Barton
- Try to only search for processes of the current user. - Prefer using pgrep (in addition to pidof) when available. - Streamline system overrides. - Get rid of HEAD_FLAGS: all systems so far support "-1". - Use "ps -o pid,comm" as the default, which is POSIX.1. - Use "sort -r" to hopefully get the newest (=highest) PID, which is the case on older systems not using randomized PIDs at least.
2024-04-05Test suite: clean up scriptsAlexander Barton
- Reformat code. - Cleanup some glitches, streamline scripts ... - Enable "set -u": Error on unset variables. - Detect "$srcdir" in prep-server3 script, too.
2024-04-02Revert "testsuite: Pass -nameopt to openssl s_client."Alexander Barton
Although this is a nice looking solution, it is not that portable: for example, the "openssl s_client" command of LibreSSL 3.8.2 on OpenBSD 7.4 does not support it. So let's revert back to the "uglier" but working variant ... This reverts commit bdb55fb4b322b2c84530855a3b5148a0e387f5b4.
2024-03-23S2S-TLS: Fix "make check" in separate build directoryAlexander Barton
2024-02-05testsuite: Pass -nameopt to openssl s_client.Sebastian Andrzej Siewior
The default value for the -nameopt option changed in OpenSSL 3.2 from `oneline' to `utf8'. The `oneline' option also included a space around the fields which is not the case for `utf8'. This means that CN = my.first.domain.tld changed to CN=my.first.domain.tld and is now longer recognized, leading to test failure. This can be fixed by either going back to `oneline' or keeping `utf8' and adding additionally `space_eq'. Anoter way would be to teach the expect that the space is optional. Add explicit -nameopt option with `utf8,space_eq' which is understood by by OpenSSL 3.2 and earlier to make explicit. Remove the wildcard. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
2024-01-23Testsuite: Test for the openssl command before using itAlexander Barton
And skip the tests calling it instead of failing!
2024-01-11Test suite: Update for OpenSSL 3.xAlexander Barton
2022-12-25Spelling fixes, mostly in file commentsAlexander Barton
2020-11-01Test suite: Wait 2 seconds after reloading the daemonAlexander Barton
On reload, all listening ports are closed, configuration updated, and then opened again. Which leads to subsequent tests running while the daemon isn't listening on any ports, and that's why the tests fail. The "proper" way whould be to loop and check for open ports, but waiting is what the start-server.sh script does right now, so stick with this in reload-server.sh for now as well. This fixes the issue, at least on my RaspberryPi ... Closes #280.
2020-05-22testsuite: Add missing files to EXTRA_DISTHilko Bengen
26~rc1 as extracted from tarball cannot be built/tested with SSL support because of a missing script and certificates.
2020-05-07SSL test server: Use port 6790, like "test server #2"Alexander Barton
Don't use the "standard" IRC SSL port 6697, as this easily collides with real (ng)IRCd instances running on the same machine. And by reusing port 6790, which is already used by the "test server #2", we don't need any other port than the test suite already uses.
2020-04-25updating testsuite to support ssl-testsJohann Hartwig Hauschild
2020-03-29Test suite: Test multiple "Modes" lines in [Channel] sectionsAlexander Barton
2020-03-29Predefined channles: Fix handling of legacy configuration optionsAlexander Barton
Fix the handling of legacy "Key" and "MaxUsers" [Channel] settings: - Activate them before evaluating the "Modes" parameter, to allow the latter to override those legacy options. - Enforce setting the respective +k/+l mode(s) to support the legacy "Mode = kl" notation, which was valid but is an invalid MODE string: key and limit are missing! So set them manually when "k" or "l" are detected in the first MODE parameter. - Sort modes +kl alphabetically, adjust test suite accordingly.
2019-11-03Make test suite compatible with HaikuAlexander Barton
2018-11-28Implement new configuration option "MaxPenaltyTime" (#251)Alexander Barton
This option configures the maximum penalty time increase in seconds, per penalty event. Set to -1 for no limit (the default), 0 to disable penalties altogether. ngIRCd doesn't use penalty increases higher than 2 seconds during normal operation, so values higher than 1 rarely make sense. Disabling (or reducing) penalties can greatly speed up "make check" runs for example, see below, but are mostly a debugging feature and normally not meant to be used on production systems! Some example timings running "make check" from my macOS workstation: - MaxPenaltyTime not set: 4:41,79s - "MaxPenaltyTime = 1": 3:14,71s - "MaxPenaltyTime = 0": 25,46s Closes #249.
2016-01-07Send_Message: Fix handling of "empty" targetsAlexander Barton
Clients can specify multiple targets for the "PRIVMSG", "NOTICE", and "SQUERY" commands, separated by commas (e. g. "PRIVMSG a,#b,c :text"). Since commit 49ab79d0 ("Limit the number of message targes, and suppress duplicates"), ngIRCd crashed when the client sent the separator character only as target(s), e. g. "," or ",,,," etc.! This patch fixes the bug and adds a test case for this issue. Thanks to Florian Westphal <fw@strlen.de> for spotting the issue!
2016-01-04Limit the number of message targes, and suppress duplicatesAlexander Barton
This prevents an user from flooding the server using commands like this: PRIVMSG nick1,nick1,nick1,... Duplicate targets are suppressed silently (channels and clients). In addition, the maximum number of targets per PRIVMSG/NOTICE/... command are limited to MAX_HNDL_TARGETS (25). If there are more, the daemon sends the new 407 (ERR_TOOMANYTARGETS_MSG) numeric, containing the first target that hasn't been handled any more. Closes #187.
2015-12-30Test suite: Add new test for server-server loginsAlexander Barton
This test detects the recent NJOIN breakage, for example ...
2015-07-19Streamline ".gitignore" filesAlexander Barton
2015-03-14Don't send nick name as default PART reasonAlexander Barton
No other IRC daemon seems to do this (today?), don't remember why ngIRCd did it in the first place ... Closes #185. Reported by Cahata in #ngircd, thanks!
2015-03-11Fix typo in src/testsuite/READMEAlexander Barton
2014-06-09Test suite: Don't use DNS lookupsAlexander Barton
Different operating systems do behave quite differently when doing DNS lookups, for example "127.0.0.1" sometimes resolves to "localhost" and sometimes to "localhost.localdomain" (for example OpenBSD). And other systems resolve "localhost" to the real host name (for example Cygwin). So not using DNS at all makes the test site much more portable.
2014-06-04Add "tests-skipped.lst" to src/testsuite/.gitignoreAlexander Barton
2014-06-04Test suite/platformtest.sh: Detect when tests have been skippedAlexander Barton
Detect if some tests have been skipped, for example when telnet(1) or expect(1) is missing: ./contrib/platformtest.sh will echo a warning message now.
2014-04-17Test suite: Update file headers and commentsAlexander Barton
2014-01-10Test suite: explicitely enable glibc memory checkingAlexander Barton
2013-09-03getpid.sh: use /bin/pidof when availableAlexander Barton
2013-05-25IncludeDir: default to "$SYSCONFDIR/ngircd.conf.d"Alexander Barton
Now "IncludeDir" defaults to "$SYSCONFDIR/ngircd.conf.d" instead of no directory, but a missing directory is only reported as an error if it has explicitely configured in the main configuration file and simply ignored otherwise. Therefore it is now possible not to touch the default (sample) configuration file at all, and set all distribution and/or system specific configuration options in "*.conf" files stored in "$SYSCONFDIF/ngircd.conf.d/". Thanks to "Elmasloco" for the idea!
2013-02-22src/testsuite/README: add whois-test.eAlexander Barton
2012-12-25Add Cygwin binaries (*.exe) to .gitignore filesAlexander Barton
2012-11-13Test suite: correctly execute tests when stdout is redirectedAlexander Barton
2012-11-04Test suite: add some "remote checks" to whois-test.eAlexander Barton
2012-10-19Update error messages for user mode +b and channel Mode +M.DNS777
Replaced error message for channel mode +M with ERR_NEEDREGGEDNICK_MSG (used by Bahamut, inspircd, ircu & Unreal too) and using numeric 477 and the msg simliar like inspircd. Replaced the error message ERR_CANNOTSENDTONICK_MSG for user mode +b with ERR_NONONREG_MSG and using numeric 486, similar like unrealircd. (cherry picked from commit 55a61ab17f63a9e757b7c7598c31b98ce5a132e8 and commit 3737d9ab7da1ea0485cefc07c65dc5308bf0db02)
2012-10-15Test suite: add more checks to whois-test.eAlexander Barton
2012-10-08Test suite: add test for user mode "b"Alexander Barton
2012-10-06Test suite: make expect scripts more verboseAlexander Barton
Now tests.sh transforms each expect script it executes using sed(1) and inserts a 'puts -nonewline stderr "."' in front of each "expect" command.
2012-10-06Test suite: remove indentation of messagesAlexander Barton
2012-09-27Test suite: don't use "mkdir -p"Alexander Barton
"mkdir -p" is not supported on all platforms. Tested with Apple A/UX 3.1.x.
2012-09-27Fix getpid.sh to work on Apple A/UX againAlexander Barton
2012-09-24Remove all geneerated Makefile.am on "make maintainer-clean"Alexander Barton
2012-09-24Merge branch 'automake-am11-am12'Alexander Barton
* automake-am11-am12: autogen.sh: detect automake version format a.b.c and a.b configure.ng: don't require GIT tree to detect version string Include .mailmap file in distribution archives Include all build-system files into distribution archives Change build system to support new and old GNU automake
2012-09-24automake: don't use INCLUDES, it's AM_CPPFLAGS nowadaysAlexander Barton
2012-09-24Include all build-system files into distribution archivesAlexander Barton
2012-09-23Change build system to support new and old GNU automakeAlexander Barton
Starting with GNU automake 1.12, the "de-ANSI-fication support" has been removed, which ngIRCd used to enable building itself on very old systems. Now the problem is, that using automake >= 1.12 isn't working because of the now unsupported M4 macros. Therefore the solution that this patch implements is to dynamically generate the automake input files with our own ./autogen.sh script: configure.ng => configure.in Makefile.ng => Makefile.am This is quite an ugly approach, but it works and enables us to: 1. use current automake >= 1.12 for development and "private builds", 2. still build distribution archives using automake 1.11.x that have "de-ANSI-fication support" enabled in the generated Makefile's. And if you are using Makefile's generated with a automake version newer than 1.11.x (without "de-ANSI-fication support"), the ./configure script warns you not to use this generated build system to generate distribution archives. Drawback of this patch: you MUST use our autogen.sh script, you can't call the autoconf/automake commands directly any more; but autoreconf should still work ...
2012-08-06Tests and documentation for xopSebastian Köhler