Commit Graph

111 Commits

Author SHA1 Message Date
Erik Ekman f1e7823a3d Add helper for matching topdomain and getting data length 2021-08-25 01:13:48 +02:00
Erik Ekman 589027568b Add option to allow wildcard as start of topdomain 2021-08-24 23:32:57 +02:00
Erik Ekman f09dadb1ed test: Replace assert_msg(strcmp(),...) with str_eq
str_eq will print the strings in case of failure:

Assertion '"BB." == buf' failed: "BB." == "BB.", buf == "BA."
2021-08-24 23:10:26 +02:00
Erik Ekman 5388eae1df test/common: Use ck_assert_str_eq to verify strings
Requires check 0.9.6, released Dec 2008

Also reset error ptr between checks.
2021-08-24 23:04:32 +02:00
Erik Ekman 3c7169fcf5 Change formatter for size_t from %d to %zu in tests 2021-06-05 14:47:24 +02:00
Erik Ekman 13d081f5ed Convert fail_unless to ck_assert[_msg]
To work with check 0.15.0

Add == 0 to change fail_if to asserts as well.
2020-07-23 22:31:53 +02:00
Erik Ekman d09c3e4f0b Revert "Hide clang warnings when building tests"
Didn't work again, giving up for now.

This reverts commit c77b875e89.
2020-07-03 18:25:54 +02:00
Erik Ekman c77b875e89 Hide clang warnings when building tests
Try again while using gmake for tests on macOS on travis-ci.
2020-07-03 18:19:12 +02:00
Erik Ekman 07beeca580 Revert "Hide clang warnings when building tests"
Didn't help on travis macOS build.

This reverts commit ed78f1b43f.
2020-07-03 18:11:51 +02:00
Erik Ekman ed78f1b43f Hide clang warnings when building tests 2020-07-03 18:02:53 +02:00
Ralf Ramsauer 8d4b43e178 Update tests to latest changes
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
[Erik Ekman: reverted login test changes]
2017-04-10 21:25:42 +02:00
Erik Ekman d8bf5cc85b Fix test build after removed test 2015-07-19 10:03:27 +02:00
Erik Ekman f61ed01a3c Remove unused method users_waiting_on_reply() 2015-07-19 09:48:36 +02:00
Erik Ekman 9a45c4aa66 Change license wording to follow ISC license exactly
"Permission to use, copy, modify, and distribute this software" is now
"Permission to use, copy, modify, and/or distribute this software".

Add license header to source files missing one.
2014-08-07 21:18:33 +02:00
Erik Ekman b715be5cf3 Fix authentication bypass bug
The client could bypass the password check by continuing after getting error
from the server and guessing the network parameters. The server would still
accept the rest of the setup and also network traffic.

Add checks for normal and raw mode that user has authenticated before allowing
any other communication.

Problem found by Oscar Reparaz.
2014-06-16 21:43:22 +02:00
Erik Ekman 2466cd184a Change readshort() to work with unsigned values 2014-06-09 19:47:44 +02:00
Erik Ekman a23899513d Remove trailing whitespace 2014-06-01 08:46:54 +02:00
Erik Ekman 388afe3845 Update copyright 2014-06-01 08:46:54 +02:00
Erik Ekman 3914d37c99 Move error message generation into topdomain check method
Change isalpha() to a-z check to avoid locale issues
2014-05-31 10:07:36 +02:00
Erik Ekman 9bb2323f84 Improve check of topdomain to use
Add more checks and unit tests
2014-05-30 00:18:45 +02:00
Erik Ekman d6c3426b84 Set C standard to C99
Also include strings.h where strcasecmp() is used
2014-05-29 18:38:43 +02:00
Erik Ekman b3f8e7118a Do not set CC in tests 2014-05-29 17:41:43 +02:00
Erik Ekman 031953e295 Fix testcase compile error on OS X 10.6+, take 2
Add includes for Darwin in another test file
2014-04-22 22:43:25 +02:00
Erik Ekman 4aa078ddd9 Fix testcase compile error on OS X 10.6+
Apply old fix from ticket #79 also to test code.
2014-04-22 22:24:11 +02:00
Erik Ekman b827a632ad Add more formatting tests
Check for IPv6 support before adding tests
2014-02-10 22:34:24 +01:00
Erik Ekman f249ee3b5d Run osflags for compile/link of tests as well
src/common.c is linked into test binary, might require some libs
2014-02-07 23:12:51 +01:00
Erik Ekman d57aebacdc Add some tests for get_addr/format_addr
IPv4 only for now for compatibility with old machines
2014-02-07 23:08:29 +01:00
Erik Ekman f11328306d Fix unused variable warnings in test cases 2014-01-29 22:41:24 +01:00
Erik Ekman b0e41e82e4 Fix gcc warning -Wsizeof-pointer-memaccess in test 2014-01-29 22:38:35 +01:00
Erik Ekman 46a3d82639 Use pkg-config to find needed libs for check.
Also add -lpthread explicitly
2014-01-29 22:12:16 +01:00
Erik Ekman 9ee78b6f4d Fix some warnings in read tests 2014-01-29 21:22:58 +01:00
Erik Ekman d9d4c1dba6 Remove checks that cannot fail 2012-02-12 10:39:46 +01:00
Erik Ekman 01416bbca5 Reorganize imports for OpenBSD 2012-02-12 10:39:24 +01:00
Marcel Bokhorst a569030bb7 Android support (#105) patch from Marcel Bokhorst 2012-02-04 20:34:05 +01:00
Erik Ekman 244a47efb8 Fix strange sizeof() 2012-02-04 20:34:04 +01:00
Erik Ekman aa818c58bb fix tests after patch in #88 2012-02-04 20:34:04 +01:00
Erik Ekman 85104a4088 Fix test cases 2012-02-04 20:34:04 +01:00
Erik Ekman 8f2c210019 Fix segfault in test for BSDs 2012-02-04 20:34:04 +01:00
Erik Ekman 5951166b36 Fix data length in encoding dns queries 2012-02-04 20:34:04 +01:00
Erik Ekman 93a313b130 Added new test, found and fixed an actual bug 2012-02-04 20:34:03 +01:00
Erik Ekman 444299b86e #51 handle one block encode/decode for base32 2012-02-04 20:34:00 +01:00
Erik Ekman eed52b783f #51 handle one block encode/decode for base64 2012-02-04 20:34:00 +01:00
Erik Ekman 1cdba385ef Added tests on forwarded query cache 2012-02-04 20:34:00 +01:00
Erik Ekman 95513517ee refactored tests 2012-02-04 20:34:00 +01:00
Erik Ekman b6fc3fc0ef Made dns_get_id return unsigned short, added test cases 2012-02-04 20:34:00 +01:00
Erik Ekman 3ee49377e8 Extended test cases 2012-02-04 20:34:00 +01:00
Erik Ekman 0836ad0a5b revert cygwin stuff 2012-02-04 20:34:00 +01:00
Erik Ekman 97bf71e944 Make it build and fix tests in cygwin 2012-02-04 20:33:59 +01:00
Erik Ekman dc17bc69fe #40, fix dots in hostname when length is 113, 170, 227... Includes test. 2012-02-04 20:33:59 +01:00
Erik Ekman 3ba81894fc add osflags for tests 2012-02-04 20:33:59 +01:00