diff --git a/Knot.files b/Knot.files
index c4c4a4a47aaa097b2c98f058b451406d2f71df45..26d79c097e621eb741ac506b011715fc17337d9e 100644
--- a/Knot.files
+++ b/Knot.files
@@ -131,6 +131,7 @@ src/dnssec/tests/kasp_dir_file.c
 src/dnssec/tests/kasp_store.c
 src/dnssec/tests/key.c
 src/dnssec/tests/key_algorithm.c
+src/dnssec/tests/key_ds.c
 src/dnssec/tests/keyid.c
 src/dnssec/tests/keystore_pkcs8.c
 src/dnssec/tests/keystore_pkcs8_dir.c
@@ -485,6 +486,9 @@ src/zscanner/tests/tests.h
 src/zscanner/tests/zscanner-tool.c
 tests-fuzz/Makefile.am
 tests-fuzz/packet.c
+tests-fuzz/wrap/server.c
+tests-fuzz/wrap/tcp-handler.c
+tests-fuzz/wrap/udp-handler.c
 tests/Makefile.am
 tests/acl.c
 tests/base32hex.c
diff --git a/FUZZING b/tests-fuzz/README.md
similarity index 100%
rename from FUZZING
rename to tests-fuzz/README.md
diff --git a/tests-fuzz/packet.c b/tests-fuzz/packet.c
index 9bde7d28761c8b44c5e01de2a9a86f5d8a9b4cba..bc6fc7ec74ad651ed2a4f8a94b9c9da8184497a2 100644
--- a/tests-fuzz/packet.c
+++ b/tests-fuzz/packet.c
@@ -19,8 +19,7 @@
 #include <stdio.h>
 #include <signal.h>
 
-#include "libknot/errcode.h"
-#include "libknot/packet/pkt.h"
+#include "libknot/libknot.h"
 
 int main(void)
 {
diff --git a/tests-fuzz/wrap/server.c b/tests-fuzz/wrap/server.c
index a3738a8c797fc72c912087e0c543e23a3ac83c6f..9094159df8af4b49609cd92b15b4c8297b69cb97 100644
--- a/tests-fuzz/wrap/server.c
+++ b/tests-fuzz/wrap/server.c
@@ -23,7 +23,7 @@
 
 extern void udp_master_init_stdio(server_t *server);
 
-int server_reconfigure(conf_t *conf, void* data)
+int server_reconfigure(conf_t *conf, void *data)
 {
 	log_info("AFL, Wrap server_reconfigure()");
 	int ret = _orig_server_reconfigure(conf, data);
diff --git a/tests-fuzz/wrap/udp-handler.c b/tests-fuzz/wrap/udp-handler.c
index cc62f1345072d803c0ce8d815166d82e5b708a78..9856f19d58bf2ab48abb08c1d81dd3e94c94a048 100644
--- a/tests-fuzz/wrap/udp-handler.c
+++ b/tests-fuzz/wrap/udp-handler.c
@@ -14,12 +14,13 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 /*
  * Udp handler listen on stdin and send to stdout.
  * To use this handler initialize it with udp_master_init_stdin.
  */
 
+#include <stdbool.h>
+
 #include "knot/server/udp-handler.c"
 #include "knot/common/debug.h"
 
@@ -27,11 +28,12 @@ struct udp_stdin {
 	struct iovec iov[NBUFS];
 	uint8_t buf[NBUFS][KNOT_WIRE_MAX_PKTSIZE];
 	struct sockaddr_storage addr;
+	bool afl_persistent;
 };
 
-static void next(void)
+static inline void next(struct udp_stdin *rq)
 {
-	if (getenv("AFL_PERSISTENT")) {
+	if (rq->afl_persistent) {
 		raise(SIGSTOP);
 	} else {
 		exit(0);
@@ -47,10 +49,12 @@ static void *udp_stdin_init(void)
 		rq->iov[i].iov_len = KNOT_WIRE_MAX_PKTSIZE;
 	}
 
-	struct sockaddr_in * a = (struct sockaddr_in *) &rq->addr;
-	a->sin_family=AF_INET;
+	struct sockaddr_in *a = (struct sockaddr_in *)&rq->addr;
+	a->sin_family = AF_INET;
 	a->sin_addr.s_addr = IN_LOOPBACKNET;
 	a->sin_port = 42;
+
+	rq->afl_persistent = getenv("AFL_PERSISTENT") != NULL;
 	return rq;
 }
 
@@ -62,12 +66,12 @@ static int udp_stdin_deinit(void *d)
 
 static int udp_stdin_recv(int fd, void *d)
 {
-	struct udp_stdin *rq = (struct udp_stdin *) d;
+	struct udp_stdin *rq = (struct udp_stdin *)d;
 	rq->iov[RX].iov_len = fread(rq->iov[RX].iov_base,
 	                            1, KNOT_WIRE_MAX_PKTSIZE, stdin);
 
 	if (rq->iov[RX].iov_len == 0) {
-		next();
+		next(rq);
 	}
 
 	return rq->iov[RX].iov_len;
@@ -75,15 +79,15 @@ static int udp_stdin_recv(int fd, void *d)
 
 static int udp_stdin_handle(udp_context_t *ctx, void *d)
 {
-	struct udp_stdin *rq = (struct udp_stdin *) d;
+	struct udp_stdin *rq = (struct udp_stdin *)d;
 	udp_handle(ctx, STDIN_FILENO, &rq->addr, &rq->iov[RX], &rq->iov[TX]);
 	return 0;
 }
 
 static int udp_stdin_send(void *d)
 {
-	struct udp_stdin *rq = (struct udp_stdin *) d;
-	next();
+	struct udp_stdin *rq = (struct udp_stdin *)d;
+	next(rq);
 	return 0;
 }
 
@@ -95,7 +99,7 @@ void udp_master_init_stdio(server_t *server) {
 	log_info("AFL, UDP handler listen on stdin");
 
 	// register our dummy interface to server
-	iface_t * ifc = malloc(sizeof(iface_t));
+	iface_t *ifc = malloc(sizeof(iface_t));
 	ifc->fd[RX] = STDIN_FILENO;
 	ifc->fd[TX] = STDOUT_FILENO;