- Jul 29, 2021
-
-
Tomas Krizek authored
-
It's mainly in tests.
-
logging
-
- Jul 16, 2021
-
-
Vladimír Čunát authored
-
- May 25, 2021
-
-
Tomas Krizek authored
- add lua options debugging.assumption_abort and debugging.assumption_fork to make the behaviour configurable - select default values based on meson buildtype: - debug/debugoptimized (default, e.g. used in CI) - abort and don't fork - plain/release - don't abort, but fork if abort is user-configured
-
- Nov 16, 2020
-
-
Vladimír Čunát authored
LuaJIT FFI was using opendir() (etc.) variants with 32-bit inodes but the C parts was using them as 64-bit inode variants. Consequently the `struct dirent` layout didn't match and we were getting filenames shifted by eight bytes. Now the whole dir-listing lua function is written in C.
-
- Oct 26, 2020
-
-
This change allows map() to work with systemd integration. As a bonus the new client implementation is based on Lua cqueues allows caller to wrap map() in worker.corroutine() and get asynchronous execution/avoid blocking main loop. Currently socket communication does not employ timeouts so a hang instance will lead to hang map() call. This does not affect query processing _if_ map() is being run in worker.corroutine. Fixes: #554 Fixes: #620
-
- Aug 05, 2020
-
-
Vladimír Čunát authored
In particular this gets rid of last light user data inside kresd. It was still causing problems on some systems, for example Debian Sid. The error was the same: "bad light userdata pointer" from luajit, but note that the problem can still be triggered by lua libraries, e.g. cqueues.
-
- Feb 25, 2020
-
-
These files did not have GNU GPL v3 boilderplate in them so I've added machine readable tag with appropriate license.
-
- Jan 24, 2020
-
-
Tomas Krizek authored
-
- Jun 13, 2019
-
-
Vladimír Čunát authored
We're very much depending on LuaJIT, for years already. The removed stuff seems very unlikely to be useful in any LuaJIT in forseeable future. The Lua language is effectively forked.
-
Vladimír Čunát authored
...when making calls from lua to C modules; use luaJIT FFI instead. This eliminates some cases of lua_pushlightuserdata().
-
- Apr 04, 2019
- Mar 12, 2019
-
-
Tomas Krizek authored
-
- Jan 23, 2019
-
-
We don't need the trustanchor() lua function for root bootstrap anymore, so let's get rid of it. It was undocumented (internal).
-
- Dec 11, 2018
-
-
added new global bogus_log
-
- Aug 17, 2018
-
-
Problem was caused by our lookup format where only the root zone starts with \0 and all other zones start differently. This caused cache_match('.') to match only data from root zone.
-
- Jul 16, 2018
- Jan 23, 2018
-
-
Config tests now have ability to run daemon with different arguments and to check exit code.
-
- Dec 21, 2017
-
-
Marek Vavruša authored
This leverages the HTTP interface to trace execution of individual requests. This is helpful for troubleshooting problems with a specific instance, or to generate test files (as it writes out answers received). Ideally it would also print a timeline of request processing broken down by function (or layer) and the amount of time spent, but there's no tracepoint for that yet.
-
- Nov 28, 2017
-
-
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).
- Nov 24, 2017
-
-
Marek Vavruša authored
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 ```
-
Marek Vavruša authored
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.
-
- Nov 23, 2017
-
-
Marek Vavruša authored
This is super useful for checking things like misusing undefined variables or modifying globals, especially in modules when it's not immediately visible which variables are in the global namespace and which are not. I added several exceptions for files in daemon/lua and tests, as for example sandbox module needs to legitimately modify global namespace. There's a lot of things failing, so I didn't make it part of the standard `make check`, but we should eventually enable it to improve code quality and spot problems with CI.
-