Commit 6edfef4f authored by Petr Špaček's avatar Petr Špaček

Merge branch 'ta_update_unload' into 'master'

kresd.j2: disable TA update (RFC5011) queries

See merge request !159
parents 04dd33b5 f601f2f7
Pipeline #47179 failed with stage
in 1 minute and 14 seconds
image: $CI_REGISTRY/knot/knot-resolver/ci/debian-stable:knot-2.7
image: $CI_REGISTRY/knot/knot-resolver/ci/debian-buster:knot-2.8
variables:
LC_ALL: C.UTF-8
......@@ -56,16 +56,17 @@ test:comparative:kresd:
<<: *test
script:
# test kresd binary
- git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git /tmp/kresd-local-build
- GIT_DIR=/tmp/kresd-local-build/.git git log -1
- ( cd /tmp/kresd-local-build ; git submodule update --init --recursive )
- PREFIX=/tmp/.local make -C /tmp/kresd-local-build -k all
- PREFIX=/tmp/.local make -C /tmp/kresd-local-build install
- git clone --recurse-submodules -j8 --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git /tmp/kresd-local-build
- pushd /tmp/kresd-local-build
- git log -1
- meson build_local --default-library=static --prefix=/tmp/.local
- ninja -C build_local install
- popd
# compare results from latest Deckard with results from merge base
- cp ci/common.sh /tmp
- cp ci/compare-tests.sh /tmp
- cp ci/junit-compare.py /tmp
- LD_LIBRARY_PATH=/tmp/.local/lib PATH=/tmp/.local/sbin:$PATH /tmp/compare-tests.sh $(pwd)/kresd_run.sh
- PATH=/tmp/.local/sbin:$PATH /tmp/compare-tests.sh $(pwd)/kresd_run.sh
artifacts:
when: always
expire_in: '1 hour'
......@@ -79,12 +80,13 @@ test:comparative:kresd:
test:latest:kresd:
<<: *test
script:
- git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git kresd-local-build
- GIT_DIR=$(pwd)/kresd-local-build/.git git log -1
- ( cd kresd-local-build ; git submodule update --init --recursive )
- PREFIX=$(pwd)/.local make -C kresd-local-build -k all
- PREFIX=$(pwd)/.local make -C kresd-local-build install
- TMPDIR=$(pwd) LD_LIBRARY_PATH=$(pwd)/.local/lib PATH=$(pwd)/.local/sbin:$PATH ./kresd_run.sh -n $(nproc)
- git clone --recurse-submodules -j8 --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git kresd-local-build
- pushd kresd-local-build
- git log -1
- meson build_local --default-library=static --prefix="$PWD/../.local"
- ninja -C build_local install
- popd
- TMPDIR=$(pwd) PATH=$(pwd)/.local/sbin:$PATH ./kresd_run.sh -n $(nproc)
artifacts:
when: on_failure
expire_in: 1 week
......
......@@ -3,9 +3,9 @@ import glob
import logging
import os
import re
import yaml
import pytest
import yaml
Scenario = namedtuple("Scenario", ["path", "qmin", "config"])
......
......@@ -2,10 +2,9 @@
# Copyright (C) 2017
import posixpath
import logging
import os
import collections.abc
import logging
import os # requires posix
from augeas import Augeas
......@@ -22,7 +21,7 @@ def join(*paths):
FIXME: Beware: // is normalized to /
"""
norm_paths = [posixpath.normpath(path) for path in paths]
norm_paths = [os.path.normpath(path) for path in paths]
# first path must be absolute
assert norm_paths[0][0] == '/'
new_paths = [norm_paths[0]]
......@@ -31,9 +30,9 @@ def join(*paths):
if path.startswith('/'):
path = path[1:]
new_paths.append(path)
new_path = posixpath.join(*new_paths)
new_path = os.path.join(*new_paths)
log.debug("join: new_path %s", new_path)
return posixpath.normpath(new_path)
return os.path.normpath(new_path)
class AugeasWrapper:
......
......@@ -3,8 +3,7 @@ import binascii
import calendar
from datetime import datetime
import logging
import os
import posixpath
import os # requires posix
import random
import socket
import struct
......@@ -229,7 +228,7 @@ class Entry:
def process_sections(self):
sections = set()
for section in self.node.match("/section/*"):
section_name = posixpath.basename(section.path)
section_name = os.path.basename(section.path)
sections.add(section_name)
for record in section.match("/record"):
owner = record['/domain'].value
......@@ -867,5 +866,5 @@ def parse_file(path):
kv = [x.strip() for x in line.split(':', 1)]
if len(kv) >= 2:
config.append(kv)
scenario = Scenario(node["/scenario"], posixpath.basename(node.path))
scenario = Scenario(node["/scenario"], os.path.basename(node.path))
return scenario, config
......@@ -25,8 +25,8 @@ mode('permissive')
-- Always retry failing resolver
option('NO_THROTTLE', true)
-- make sure that value specified at compile-type does not break tests
trust_anchors.keyfile_default = nil
-- make sure that value specified at compile-time does not break tests
trust_anchors.remove('.')
{% for TAF in TRUST_ANCHOR_FILES %}
trust_anchors.add_file('{{TAF}}')
{% endfor %}
......@@ -78,6 +78,11 @@ modules.load( 'view')
modules = { 'workarounds < iterate' }
{% endif %}
-- Disable RFC5011 TA update
if ta_update then
modules.unload('ta_update')
end
-- Disable RFC8145 signaling, scenario doesn't provide expected ansers
if ta_signal_query then
modules.unload('ta_signal_query')
......
......@@ -5,7 +5,8 @@ Invoke with `python3 -m pytest forwarder_check.py --forwarder [IP of forwarder]`
import ipaddress
import dns.message
import pytest
# NOTE silence incorrectly reported error, may be removed once it passes in CI
import pytest # pylint: disable=wrong-import-order
import answer_checker
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment