]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
7 years agodaemon: reuse outbound TCP connections if possible; TLS over outbound TCP connection
Grigorii Demidov [Tue, 12 Sep 2017 11:52:10 +0000 (13:52 +0200)] 
daemon: reuse outbound TCP connections if possible; TLS over outbound TCP connection

7 years agoMerge !430: Travis fixes and dependency updates
Vladimír Čunát [Thu, 4 Jan 2018 13:39:53 +0000 (14:39 +0100)] 
Merge !430: Travis fixes and dependency updates

7 years agotravis: skip Deckard tests
Vladimír Čunát [Thu, 4 Jan 2018 13:26:32 +0000 (14:26 +0100)] 
travis: skip Deckard tests

7 years agotravis: try to fix python modules
Vladimír Čunát [Thu, 4 Jan 2018 10:45:38 +0000 (11:45 +0100)] 
travis: try to fix python modules

7 years agobootstrap-depends: update dependencies
Vladimír Čunát [Thu, 4 Jan 2018 10:35:34 +0000 (11:35 +0100)] 
bootstrap-depends: update dependencies

7 years agoMerge branch 'travis_fixes' into 'master'
Petr Špaček [Thu, 4 Jan 2018 13:16:30 +0000 (14:16 +0100)] 
Merge branch 'travis_fixes' into 'master'

Do not point to Travis from README

See merge request knot/knot-resolver!429

7 years agoREADME: use badges from Gitlab instead of Travis/Coveralls
Petr Špaček [Thu, 4 Jan 2018 13:09:28 +0000 (14:09 +0100)] 
README: use badges from Gitlab instead of Travis/Coveralls

7 years agoMakefile: suppress misleadning warning about missing coverage.stats dir
Petr Špaček [Thu, 4 Jan 2018 10:45:32 +0000 (11:45 +0100)] 
Makefile: suppress misleadning warning about missing coverage.stats dir

7 years agoMakefile: remove unused check-config-clean
Petr Špaček [Thu, 4 Jan 2018 10:45:05 +0000 (11:45 +0100)] 
Makefile: remove unused check-config-clean

7 years agoMerge branch 'vendemiat/extend_kres_lua' into 'master'
Petr Špaček [Thu, 4 Jan 2018 10:19:55 +0000 (11:19 +0100)] 
Merge branch 'vendemiat/extend_kres_lua' into 'master'

Add useful lua functions to handle knot types

See merge request knot/knot-resolver!425

7 years agoallow access to cache object through context
Marek Vavruša [Thu, 4 Jan 2018 00:07:35 +0000 (16:07 -0800)] 
allow access to cache object through context

this surfaces the struct kr_cache through context variable,
it doesn't implement any API or documented interface for it,
so I just added a tests for the struct presence and introspection

7 years agoadded basic tests for cache interface
Marek Vavruša [Wed, 3 Jan 2018 23:24:23 +0000 (15:24 -0800)] 
added basic tests for cache interface

7 years agorenamed pkt:clear() to pkt:recycle() and added tests
Marek Vavruša [Wed, 3 Jan 2018 20:00:49 +0000 (12:00 -0800)] 
renamed pkt:clear() to pkt:recycle() and added tests

7 years agosupport text conversion of unknown RR types
Marek Vavruša [Tue, 2 Jan 2018 23:03:22 +0000 (15:03 -0800)] 
support text conversion of unknown RR types

7 years agoadded more functions to packet, added tests
Marek Vavruša [Fri, 29 Dec 2017 21:01:56 +0000 (13:01 -0800)] 
added more functions to packet, added tests

7 years agoadd useful lua functions to handle knot types
Vicky Shrestha [Thu, 21 Dec 2017 06:07:02 +0000 (22:07 -0800)] 
add useful lua functions to handle knot types

7 years agoMerge branch 'vendemiat/track_qsize' into 'master'
Petr Špaček [Thu, 4 Jan 2018 09:40:46 +0000 (10:40 +0100)] 
Merge branch 'vendemiat/track_qsize' into 'master'

daemon: add query packet size to kr_request

See merge request knot/knot-resolver!424

7 years agoAdd query packet size to kr_request
Vicky Shrestha [Sat, 16 Dec 2017 04:37:15 +0000 (20:37 -0800)] 
Add query packet size to kr_request

This is useful when we do logging from the finish layer

7 years agoMerge branch 'publish_master_coverage' into 'master'
Petr Špaček [Wed, 3 Jan 2018 17:21:48 +0000 (18:21 +0100)] 
Merge branch 'publish_master_coverage' into 'master'

CI: publish coverage only for master branch (on web)

See merge request knot/knot-resolver!426

7 years agoCI: publish coverage only for master branch (on web)
Petr Špaček [Wed, 3 Jan 2018 16:56:39 +0000 (17:56 +0100)] 
CI: publish coverage only for master branch (on web)

Non-master branches must not overwrite results from master branch.
From now only master branch publishes results on Gitlab Pages.
Results for other branches can be downloaded from artifacts.

7 years agoMerge branch 'build-coverage-artifacts' into 'master'
Petr Špaček [Sun, 24 Dec 2017 00:37:14 +0000 (01:37 +0100)] 
Merge branch 'build-coverage-artifacts' into 'master'

CI coverage: build coverage report

See merge request knot/knot-resolver!407

7 years agofixup! build: added `make coverage` to compute C and Lua code coverage
Petr Špaček [Sat, 23 Dec 2017 22:47:24 +0000 (23:47 +0100)] 
fixup! build: added `make coverage` to compute C and Lua code coverage

Test coverage results for Lua code were off-by-one line.

7 years agoCI coverage: parallelize Lua code coverage processing
Petr Špaček [Sat, 23 Dec 2017 19:32:24 +0000 (20:32 +0100)] 
CI coverage: parallelize Lua code coverage processing

Execution of scripts/luacov_to_info.lua can take quite a long time so it
is now done in paralell.

Beware: This needs proper depedencies on coverage-lua-fix-paths target
and so on to avoid race conditions.

7 years agoCI coverage: merge test coverage data from parallel runs
Petr Špaček [Fri, 22 Dec 2017 12:21:24 +0000 (13:21 +0100)] 
CI coverage: merge test coverage data from parallel runs

We run tests in paralell so have to make sure that coverage tools
do not overwrite results from each run.

This is hacky because lcov tool insists on having gcno and gcda files
in the same place as original source, so we have to copy files
to workaround this.

7 years agodaemon: gather luacov statistics from early start
Petr Špaček [Thu, 21 Dec 2017 15:42:20 +0000 (16:42 +0100)] 
daemon: gather luacov statistics from early start

If KRESD_COVERAGE_STATS environment variable is set, luacov statistics
are saved to path specified by it.

Beware! Parallel execution needs special handling which is not built-in.

7 years agoCI coverage: add missing Lua files to the report
Petr Špaček [Thu, 21 Dec 2017 09:09:11 +0000 (10:09 +0100)] 
CI coverage: add missing Lua files to the report

Luacov does not know about files which were not loaded at all.
Script luacov_gen_empty.sh generates empty luacov stats for all files
which forces luacov to show all files.

7 years agoCI coverage: handle Lua code coverage properly
Petr Špaček [Wed, 20 Dec 2017 11:47:10 +0000 (12:47 +0100)] 
CI coverage: handle Lua code coverage properly

Luacov statistics contained paths to installed files instead of source
files that it was a mess. The stats are now rewritten using hacky
mapping (created from install commands produced by make).

Also, branch and function coverage for Lua was always zero so now it is
turned off not to confuse users.

kresd config for respdiff now enables luacov as well.

7 years agofix gitignore
Marek Vavruša [Wed, 29 Nov 2017 21:58:26 +0000 (13:58 -0800)] 
fix gitignore

7 years agoCI coverage: build coverage report and publish to pages
Marek Vavruša [Wed, 29 Nov 2017 21:24:55 +0000 (13:24 -0800)] 
CI coverage: build coverage report and publish to pages

Beware: this version does not handle parallel execution

7 years agoMerge branch 'ci-transport' into 'master'
Petr Špaček [Tue, 19 Dec 2017 14:17:30 +0000 (15:17 +0100)] 
Merge branch 'ci-transport' into 'master'

CI: test transports

See merge request knot/knot-resolver!423

7 years agoDocker: update e-mail address
Petr Špaček [Tue, 19 Dec 2017 13:44:50 +0000 (14:44 +0100)] 
Docker: update e-mail address

7 years agoCI: run respdiff over UDP/TCP/TLS
Petr Špaček [Tue, 19 Dec 2017 13:41:37 +0000 (14:41 +0100)] 
CI: run respdiff over UDP/TCP/TLS

7 years agoMerge branch 'fix_memcached' into 'master'
Petr Špaček [Wed, 13 Dec 2017 14:57:19 +0000 (15:57 +0100)] 
Merge branch 'fix_memcached' into 'master'

fixup! memcached: rename module kmemcached -> memcached

See merge request knot/knot-resolver!421

7 years agofixup! memcached: rename module kmemcached -> memcached
Petr Špaček [Wed, 13 Dec 2017 13:47:06 +0000 (14:47 +0100)] 
fixup! memcached: rename module kmemcached -> memcached

7 years agoMerge branch 'http_doc_fixes' into 'master'
Petr Špaček [Tue, 12 Dec 2017 16:50:12 +0000 (17:50 +0100)] 
Merge branch 'http_doc_fixes' into 'master'

http: error out if GeoIP is requested but mmdblua is not available

See merge request knot/knot-resolver!420

7 years agohttp: error out if GeoIP is requested but mmdblua is not available
Petr Špaček [Tue, 12 Dec 2017 16:46:47 +0000 (17:46 +0100)] 
http: error out if GeoIP is requested but mmdblua is not available

7 years agoMerge !419: release 1.5.1 (and fixup details) v1.5.1
Vladimír Čunát [Tue, 12 Dec 2017 09:16:07 +0000 (10:16 +0100)] 
Merge !419: release 1.5.1 (and fixup details)

7 years agobootstrap-depends.sh: try to fix travis on osx
Vladimír Čunát [Mon, 11 Dec 2017 15:25:28 +0000 (16:25 +0100)] 
bootstrap-depends.sh: try to fix travis on osx

7 years agofix missing include
Vladimír Čunát [Mon, 11 Dec 2017 13:33:59 +0000 (14:33 +0100)] 
fix missing include

struct timeval wasn't available, probably depending on libknot version,
breaking e.g. the Docker build.

7 years agoNEWS and version update for 1.5.1
Vladimír Čunát [Mon, 11 Dec 2017 13:18:36 +0000 (14:18 +0100)] 
NEWS and version update for 1.5.1

7 years agodocs nitpick: fix rendering of "code fragments"
Vladimír Čunát [Mon, 11 Dec 2017 13:02:45 +0000 (14:02 +0100)] 
docs nitpick: fix rendering of "code fragments"

7 years agoMerge branch 'monotonic-nitpicks' into 'master'
Petr Špaček [Mon, 11 Dec 2017 12:35:29 +0000 (13:35 +0100)] 
Merge branch 'monotonic-nitpicks' into 'master'

Monotonic nitpicks

See merge request knot/knot-resolver!418

7 years agomonotonic timestamps: document they are milliseconds
Vladimír Čunát [Mon, 11 Dec 2017 12:25:18 +0000 (13:25 +0100)] 
monotonic timestamps: document they are milliseconds

7 years agoresolve.c: fix verbose logging of RTT after 0abbe1f4
Vladimír Čunát [Mon, 11 Dec 2017 12:23:39 +0000 (13:23 +0100)] 
resolve.c: fix verbose logging of RTT after 0abbe1f4

7 years agoMerge branch 'remove_devel_log' into 'master'
Petr Špaček [Mon, 11 Dec 2017 10:45:38 +0000 (11:45 +0100)] 
Merge branch 'remove_devel_log' into 'master'

detect_time_jump: remove forgotten debug print

See merge request knot/knot-resolver!417

7 years agodetect_time_jump: remove forgotten debug print
Petr Špaček [Mon, 11 Dec 2017 10:41:24 +0000 (11:41 +0100)] 
detect_time_jump: remove forgotten debug print

fixup! module: detect discontinuous jumps in the system time

7 years agoMerge branch 'monotonic-timer' into 'master'
Petr Špaček [Fri, 8 Dec 2017 14:49:07 +0000 (15:49 +0100)] 
Merge branch 'monotonic-timer' into 'master'

use monotonic time

Closes #247

See merge request knot/knot-resolver!392

7 years agomodule: detect discontinuous jumps in the system time
Vítězslav Kříž [Mon, 4 Dec 2017 11:34:33 +0000 (12:34 +0100)] 
module: detect discontinuous jumps in the system time

Check differences between real and monotonic time.
It clears cache when this diffrence changes since
last cache clear.

7 years agouse monotonic time
Vítězslav Kříž [Thu, 30 Nov 2017 16:35:27 +0000 (17:35 +0100)] 
use monotonic time

Monotonic time from libuv function uv_now (wrapped in kr_now) is
used for query timeout, stats and RTT in reputation cache.

Cache, DNSSEC Validation and Cookies use real time.

7 years agoMerge branch 'rrtype_update' into 'master'
Petr Špaček [Fri, 8 Dec 2017 13:27:06 +0000 (14:27 +0100)] 
Merge branch 'rrtype_update' into 'master'

daemon: add missing RR type definitions

See merge request knot/knot-resolver!416

7 years agodaemon: add missing RR type definitions
Petr Špaček [Fri, 8 Dec 2017 13:22:15 +0000 (14:22 +0100)] 
daemon: add missing RR type definitions

Some RR type definitions present in IANA DNS parameters registry were
missing in kresd. This commit synchronizes the tables with IANA registry
as of 2017-12-08 13:20 UTC.

At the same time, this commit is
fixup! converted constant tables, support kres.type.TYPE1234
The mentioned commit accidentally removed NULL definition which broke TA
signaling module.

7 years agoMerge branch 'detect-time-skew' into 'master'
Vitezslav Kriz [Fri, 8 Dec 2017 09:32:05 +0000 (10:32 +0100)] 
Merge branch 'detect-time-skew' into 'master'

time_skew: Detect time skew during kresd start.

See merge request knot/knot-resolver!414

7 years agotime_skew: Do not print message if trust anchor for . is not configured
Petr Špaček [Thu, 7 Dec 2017 21:29:44 +0000 (22:29 +0100)] 
time_skew: Do not print message if trust anchor for . is not configured

Without this check, the module would print warning for every single run
without root trust anchor.

7 years agotime_skew: Detect time skew during kresd start.
Vítězslav Kříž [Wed, 6 Dec 2017 13:00:16 +0000 (14:00 +0100)] 
time_skew: Detect time skew during kresd start.

This module is enabled by default, but disabled in Deckard tests.

7 years agorplan: fix kr_qflags_*() to work with more than 32 flags
Petr Špaček [Thu, 7 Dec 2017 16:45:58 +0000 (17:45 +0100)] 
rplan: fix kr_qflags_*() to work with more than 32 flags

Originally division around sizeof(uint32_t) caused silent truncation
for struct kr_qflags with sizes not multiple of 4 bytes.

Attempts to optimize using uint32_t blocks could lead to read/write
beyond end of uint32_t so I'm not willing to risk it.

Also, the code was refactored to avoid duplication between _set and _clear.
Quick look into assembly produced by gcc 7.2.1 with -O2 on x86_64 confirms that
all auxiliary functions got inlined so there are not extra function calls.

Unit tests are attached. These fail on the previous version of _set() and
_clear() and work now.

7 years agoMerge branch 'ci-fixup' into 'master'
Petr Špaček [Thu, 7 Dec 2017 10:17:16 +0000 (11:17 +0100)] 
Merge branch 'ci-fixup' into 'master'

CI fixups

Closes #282

See merge request knot/knot-resolver!415

7 years agoCI: add lua-http package to Docker image for testing
Petr Špaček [Thu, 7 Dec 2017 10:10:42 +0000 (11:10 +0100)] 
CI: add lua-http package to Docker image for testing

Related: !405

7 years agoCI: use Knot DNS 2.6 instead of master
Petr Špaček [Thu, 7 Dec 2017 08:37:26 +0000 (09:37 +0100)] 
CI: use Knot DNS 2.6 instead of master

Hopefully this will make build more reliable because breakage in Knot
DNS master will not affect us. On the other hand, we must not forget to
update Knot DNS in the image!

Closes: #282
7 years agoMerge branch 'improve-readability' into 'master'
Petr Špaček [Tue, 5 Dec 2017 10:14:54 +0000 (11:14 +0100)] 
Merge branch 'improve-readability' into 'master'

code-style: replace `-->` in for loops with `i > 0` and `i--`

See merge request knot/knot-resolver!408

7 years agocode-style: remove special operator (-->) in for loops
Vítězslav Kříž [Thu, 30 Nov 2017 12:37:03 +0000 (13:37 +0100)] 
code-style: remove special operator (-->) in for loops

7 years agoMerge branch 'confusing-error-msg' into 'master'
Petr Špaček [Mon, 4 Dec 2017 16:01:02 +0000 (17:01 +0100)] 
Merge branch 'confusing-error-msg' into 'master'

Fix confusing error messages regarding root hints

Closes #278

See merge request knot/knot-resolver!413

7 years agotrust_anchor: propper error message when file cannot be read
Vítězslav Kříž [Mon, 4 Dec 2017 14:18:22 +0000 (15:18 +0100)] 
trust_anchor: propper error message when file cannot be read

7 years agohints: server stop when root hints load failed
Vítězslav Kříž [Mon, 4 Dec 2017 14:15:33 +0000 (15:15 +0100)] 
hints: server stop when root hints load failed

If user provides custom hints file with config option hints.root_file('file')
resovler fail with error. Before it just silently pass and may fail
when loading defaults file, which leads to confusing error message.

7 years agoMerge branch 'cleanup-fixup' into 'master'
Petr Špaček [Fri, 1 Dec 2017 20:35:04 +0000 (21:35 +0100)] 
Merge branch 'cleanup-fixup' into 'master'

fixup! client: move sources into separate directory

See merge request knot/knot-resolver!410

7 years agofixup! client: move sources into separate directory
Petr Špaček [Fri, 1 Dec 2017 20:30:58 +0000 (21:30 +0100)] 
fixup! client: move sources into separate directory

Previous cleanup attempt broke installation on systems without libedit.
client-install has to be defined at least as .PHONY target.
(I want to avoid if spagethi outside of client.mk.)

7 years agoMerge branch 'cleanup' into 'master'
Petr Špaček [Fri, 1 Dec 2017 13:27:48 +0000 (14:27 +0100)] 
Merge branch 'cleanup' into 'master'

Pre-2.0 cleanup

See merge request knot/knot-resolver!409

7 years agoclient: add warning that client is highly experimental
Petr Špaček [Fri, 1 Dec 2017 13:07:42 +0000 (14:07 +0100)] 
client: add warning that client is highly experimental

7 years agoclient: move sources into separate directory
Petr Špaček [Fri, 1 Dec 2017 13:00:36 +0000 (14:00 +0100)] 
client: move sources into separate directory

Let's not mix daemon and client files as client might grow to multiple
files in future. This will also help with upcomming changes to packaging
scripts.

7 years agoetcd: rename module ketcd -> etcd
Petr Špaček [Fri, 1 Dec 2017 12:52:16 +0000 (13:52 +0100)] 
etcd: rename module ketcd -> etcd

The old name was confusing because module name was different than all
other names and references in manual.

7 years agomemcached: rename module kmemcached -> memcached
Petr Špaček [Fri, 1 Dec 2017 12:46:11 +0000 (13:46 +0100)] 
memcached: rename module kmemcached -> memcached

The old name was confusing because module name backend name provided by
that modules were different.

7 years agoscripts: make scripts/inet_pton.py compatible with Python 2 and Python 3
Petr Špaček [Fri, 1 Dec 2017 12:43:19 +0000 (13:43 +0100)] 
scripts: make scripts/inet_pton.py compatible with Python 2 and Python 3

It is 2017 already, so Python 3 is the default.

7 years agoscripts: remove scripts/supervisor.py
Petr Špaček [Fri, 1 Dec 2017 12:41:35 +0000 (13:41 +0100)] 
scripts: remove scripts/supervisor.py

The script did not work under Python 3, and given broad support for
SO_REUSEPORT, it is easier to drop it than to debug it.

7 years agoMerge branch 'priming' into 'master'
Petr Špaček [Tue, 28 Nov 2017 14:38:19 +0000 (15:38 +0100)] 
Merge branch 'priming' into 'master'

priming: implement priming queries as module

Closes #220

See merge request knot/knot-resolver!391

7 years agopriming: enable module by default
Vítězslav Kříž [Mon, 27 Nov 2017 16:10:15 +0000 (17:10 +0100)] 
priming: enable module by default

Also removed priming query from trust anchor module.
Updated deckard repository.

7 years agopriming: implement priming queries as module
Vítězslav Kříž [Wed, 1 Nov 2017 17:26:54 +0000 (18:26 +0100)] 
priming: implement priming queries as module

7 years agoMerge branch 'code-coverage' into 'master'
Petr Špaček [Tue, 28 Nov 2017 12:21:33 +0000 (13:21 +0100)] 
Merge branch 'code-coverage' into 'master'

Updated config tests, fixing code coverage for C and Lua

See merge request knot/knot-resolver!403

7 years agobuild: detect presence of lcov and luacov
Petr Špaček [Tue, 28 Nov 2017 12:18:04 +0000 (13:18 +0100)] 
build: detect presence of lcov and luacov

7 years agoscripts: pack all submodules with make-archive.sh
Petr Špaček [Tue, 28 Nov 2017 10:27:43 +0000 (11:27 +0100)] 
scripts: pack all submodules with make-archive.sh

It does not make sense to create "distribution" tarball with dirty
working tree or missing submodules, so this is now forbidden.
make-archive.sh requires clean working tree and all submodules.

Packing all submodules prevents us from releasing incomplete tarball,
especially around release time.

Distributions like Fedora are gradually getting ability to run
integration test suites so it does not hurt to pack everything including
test.

7 years agoCI: Add coverage CI target to parse code coverage and display it in MRs
Marek Vavruša [Sun, 26 Nov 2017 01:05:08 +0000 (17:05 -0800)] 
CI: Add coverage CI target to parse code coverage and display it in MRs

7 years agofixed issues with newer luacheck
Marek Vavruša [Sun, 26 Nov 2017 04:15:35 +0000 (20:15 -0800)] 
fixed issues with newer luacheck

7 years agobuild: removed old check for libknot 2.3.0
Marek Vavruša [Sun, 26 Nov 2017 01:04:30 +0000 (17:04 -0800)] 
build: removed old check for libknot 2.3.0

The 2.4.0 is required as a minimum.

7 years agobuild: make lint depends on autogenerated Lua files
Marek Vavruša [Sun, 26 Nov 2017 01:03:48 +0000 (17:03 -0800)] 
build: make lint depends on autogenerated Lua files

Lint should always render the .lua from .lua.in files before checking.

7 years agobuild: added `make coverage` to compute C and Lua code coverage
Marek Vavruša [Sun, 26 Nov 2017 00:54:11 +0000 (16:54 -0800)] 
build: added `make coverage` to compute C and Lua code coverage

Currently it gathers gcov and luacov code coverage, and merges it
in a single lcov info file. It returns summary at the end which the
CI can parse and interpret. It can build a html report later using
the data.

7 years agotests/config: added a TAP-based test environment for modules/configs
Marek Vavruša [Sun, 26 Nov 2017 00:23:46 +0000 (16:23 -0800)] 
tests/config: added a TAP-based test environment for modules/configs

I moved the test files to module directories because it allows
vendoring of whole modules including tests etc.

The test environment provides convenience functions and produces
test output in TAP format. Ideally all tests should use a common
format, so that CI can parse it provide better test output on PRs.
It seems like Gitlab CI doesn't support anything yet, but there
are two sort-of standards supported in CI tools - TAP and JUnit.
I chose TAP because it's easier to read for humans, cmocka supports it,
and it should be easier to adapt Deckard. There are also tools to
convert TAP into JUnit XML file.

Also added more tests for global functions and variables, and the
test tool now also tracks coverage (if `luacov` is installed).

7 years agoMerge branch 'docker-updates' into 'master'
Petr Špaček [Mon, 27 Nov 2017 10:14:51 +0000 (11:14 +0100)] 
Merge branch 'docker-updates' into 'master'

CI: unify Docker images for kresd and Deckard CI

See merge request knot/knot-resolver!404

7 years agoCI: unify Docker images for kresd and Deckard CI
Petr Špaček [Mon, 27 Nov 2017 10:10:09 +0000 (11:10 +0100)] 
CI: unify Docker images for kresd and Deckard CI

The Docker image now should work for both projects.
Also, the image was extended with tools to measure code coverage.

7 years agoMerge branch 'lualint' into 'master'
Petr Špaček [Fri, 24 Nov 2017 14:56:51 +0000 (15:56 +0100)] 
Merge branch 'lualint' into 'master'

CI: add Lua lint and installcheck tests

See merge request knot/knot-resolver!402

7 years agofixup! tests: fixed config tests locking up on error, added test for predict
Petr Špaček [Fri, 24 Nov 2017 14:48:56 +0000 (15:48 +0100)] 
fixup! tests: fixed config tests locking up on error, added test for predict

/bin/sh in our image does not support "function" keyword

7 years agoCI: run installcheck tests with and without Valgrind
Petr Špaček [Fri, 24 Nov 2017 14:15:25 +0000 (15:15 +0100)] 
CI: run installcheck tests with and without Valgrind

7 years agoCI: disable Deckard under Valgrind
Petr Špaček [Fri, 24 Nov 2017 13:55:35 +0000 (14:55 +0100)] 
CI: disable Deckard under Valgrind

The test is useless in its current form because all the information goes
to logs, which are later discarded.

We need to fix issues detected by Valgrind first and then enable strict
mode which will not let the test pass if any problem is detected.

This might require recompiling LuaJIT in a way which is compatible with
Valgrind.

7 years agoCI: disallow Valgrind failures in unit tests
Petr Špaček [Fri, 24 Nov 2017 13:54:34 +0000 (14:54 +0100)] 
CI: disallow Valgrind failures in unit tests

7 years agoCI: add Lua lint
Petr Špaček [Fri, 24 Nov 2017 13:05:42 +0000 (14:05 +0100)] 
CI: add Lua lint

7 years agoMerge branch 'daemon-lua-linter-fixes' into 'master'
Petr Špaček [Fri, 24 Nov 2017 07:52:59 +0000 (08:52 +0100)] 
Merge branch 'daemon-lua-linter-fixes' into 'master'

Fixed linter issues in `daemon/lua`, added more config tests

See merge request knot/knot-resolver!400

7 years agoMerge branch 'fix-obvious-linter-problems' into 'daemon-lua-linter-fixes'
Petr Špaček [Fri, 24 Nov 2017 07:46:59 +0000 (08:46 +0100)] 
Merge branch 'fix-obvious-linter-problems' into 'daemon-lua-linter-fixes'

fixed obvious linter problems

See merge request knot/knot-resolver!401

7 years agofixed obvious linter problems
Marek Vavruša [Fri, 24 Nov 2017 05:07:31 +0000 (21:07 -0800)] 
fixed obvious linter problems

there are two modules that couldn't work before:

* graphite
* ketcd

7 years agodaemon/lua: fixed unused variables, whitespace, cleanup
Marek Vavruša [Thu, 23 Nov 2017 09:02:15 +0000 (01:02 -0800)] 
daemon/lua: fixed unused variables, whitespace, cleanup

Also fixed improper promotion of `ffi` to global variable.

```
$ luacheck --codes daemon/lua/
Checking daemon/lua/config.lua                    OK
Checking daemon/lua/kres-gen.lua                  OK
Checking daemon/lua/kres.lua                      OK
Checking daemon/lua/sandbox.lua                   OK
Checking daemon/lua/trust_anchors.lua             OK
Checking daemon/lua/zonefile.lua                  OK

Total: 0 warnings / 0 errors in 6 files
```

7 years agoadded basic config test for consts, depend on knot >= 2.4, cleanup
Marek Vavruša [Thu, 23 Nov 2017 08:59:31 +0000 (00:59 -0800)] 
added basic config test for consts, depend on knot >= 2.4, cleanup

The library now depends on libknot >= 2.4.0 (in Debian stable),
this allows us to remove a dead code and sed-ing of the kres.lua

Added a basic config tests to check that constants still work,
and basic interface to rrsets still works after the change.

7 years agoMerge branch 'fix-predict-module' into 'master'
Petr Špaček [Fri, 24 Nov 2017 07:18:12 +0000 (08:18 +0100)] 
Merge branch 'fix-predict-module' into 'master'

Fixed predict module, config tests, cleanup

See merge request knot/knot-resolver!399

7 years agomodules/predict: added test for prediction process
Marek Vavruša [Fri, 24 Nov 2017 04:32:01 +0000 (20:32 -0800)] 
modules/predict: added test for prediction process

this tests that:
* sampling frequent queries works
* the code to find periodic appearences of the same name and type
* resolving predicted queries works

it doesn't test pessimistic cases or failure modes

7 years agotests/config: added basic assert support (compatible with busted)
Marek Vavruša [Fri, 24 Nov 2017 04:30:00 +0000 (20:30 -0800)] 
tests/config: added basic assert support (compatible with busted)

There is no dependency on a testing library yet, so I added a
basic interface for mocking and asserting test values to get
something to start with. I'll probably replace it with busted
or telescope later on to get nicer testing output.