Compare commits

...

4 Commits

Author SHA1 Message Date
Michal Nowak
fa44e1b192 Add gcc:rr-chaos-mode:amd64 job 2023-09-15 10:51:08 +02:00
Ondřej Surý
5b03fbc8ab Add support for running BIND 9 binaries under rr chaos mode 2023-09-15 10:51:08 +02:00
Ondřej Surý
e2ba9b7e12 Remove support for running system tests under valgrind 2023-09-15 10:51:08 +02:00
Michal Nowak
b33e47bcec DROP: Install and enable rr 2023-09-15 10:51:08 +02:00
8 changed files with 55 additions and 28 deletions

View File

@@ -398,6 +398,8 @@ cross-version-config-tests:
- test -n "${OUT_OF_TREE_WORKSPACE}" && cp -r bin/tests/system/* "${OUT_OF_TREE_WORKSPACE}/bin/tests/system/" && cd "${OUT_OF_TREE_WORKSPACE}"
- *setup_interfaces
script:
- apt-get -y update && apt-get -y install rr
- sysctl kernel.perf_event_paranoid=1
- *find_pytest
- cd bin/tests/system
- >
@@ -791,6 +793,25 @@ gcc:tarball:nosphinx:
- job: tarball-create
artifacts: true
# Run named under rr chaos mode
gcc:rr-chaos-mode:amd64:
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2 ${WITH_READLINE_LIBEDIT} --enable-rr-chaos-mode"
<<: *debian_bookworm_amd64_image
<<: *build_job
system:gcc:rr-chaos-mode:amd64:
<<: *debian_bookworm_amd64_image
<<: *system_test_job
variables:
CI_ENABLE_ALL_TESTS: 1
needs:
- job: gcc:rr-chaos-mode:amd64
artifacts: true
# Jobs for regular GCC builds on Debian 12 "bookworm" (amd64)
gcc:bookworm:amd64:

View File

@@ -645,14 +645,6 @@ variable.
need to edit multiple files to add a test.)
Valgrind
---
When running system tests, named can be run under Valgrind. The output from
Valgrind are sent to per-process files that can be reviewed after the test has
completed. To enable this, set the USE_VALGRIND environment variable to
"helgrind" to run the Helgrind tool, or any other value to run the Memcheck
tool. To use "helgrind" effectively, build BIND with --disable-atomic.
Developer Notes for pytest runner
===

View File

@@ -21,8 +21,7 @@
find . -type f \( \
-name '*~' -o -name 'core' -o -name '*.core' \
-o -name '*.log' -o -name '*.pid' -o -name '*.keyset' \
-o -name named.run -o -name ans.run \
-o -name '*-valgrind-*.log' \) -print | xargs rm -f
-o -name named.run -o -name ans.run \) -print | xargs rm -f
status=0

View File

@@ -23,6 +23,11 @@ export TOP_SRCDIR=@abs_top_srcdir@
# Provide TMPDIR variable for tests that need it.
export TMPDIR=${TMPDIR:-/tmp}
TEST_TOOL_PREFIX="@TEST_TOOL_PREFIX@"
if [ -n "${TEST_TOOL_PREFIX}" ]; then
TEST_TOOL_PREFIX="${TEST_TOOL_PREFIX} "
fi
export ARPANAME=$TOP_BUILDDIR/bin/tools/arpaname
export CDS=$TOP_BUILDDIR/bin/dnssec/dnssec-cds
export CHECKCONF=$TOP_BUILDDIR/bin/check/named-checkconf
@@ -43,7 +48,7 @@ export JOURNALPRINT=$TOP_BUILDDIR/bin/tools/named-journalprint
export KEYFRLAB=$TOP_BUILDDIR/bin/dnssec/dnssec-keyfromlabel
export KEYGEN=$TOP_BUILDDIR/bin/dnssec/dnssec-keygen
export MDIG=$TOP_BUILDDIR/bin/tools/mdig
export NAMED=$TOP_BUILDDIR/bin/named/named
export NAMED=${TEST_TOOL_PREFIX}${TOP_BUILDDIR}/bin/named/named
export NSEC3HASH=$TOP_BUILDDIR/bin/tools/nsec3hash
export NSLOOKUP=$TOP_BUILDDIR/bin/dig/nslookup
export NSUPDATE=$TOP_BUILDDIR/bin/nsupdate/nsupdate

View File

@@ -277,7 +277,7 @@ $DIG $DIGOPTS @$ns4 TXT big.tld4 > /dev/null 2>&1
# check named doesn't start with a broken config
$NAMED -D rrl-ns5 -gc broken.conf > broken.out 2>&1 &
$NAMED -D rrl-ns5 -gc broken.conf > broken.out 2>&1 > named.rrl-ns5.run &
sleep 2
grep "min-table-size 1" broken.out > /dev/null || setret "min-table-size 0 was not changed to 1"

View File

@@ -57,7 +57,7 @@ run_named() (
shift
if cd "$dir" > /dev/null 2>&1
then
"${NAMED}" "$@" ${NAMED_DEFAULT_ARGS} >> "$run" 2>&1 &
${NAMED} "$@" ${NAMED_DEFAULT_ARGS} >> "$run" 2>&1 &
echo $!
fi
)

View File

@@ -230,22 +230,10 @@ sub construct_ns_command {
my $command;
if ($ENV{'USE_VALGRIND'}) {
$command = "valgrind -q --gen-suppressions=all --num-callers=48 --fullpath-after= --log-file=named-$server-valgrind-%p.log ";
if ($ENV{'USE_VALGRIND'} eq 'helgrind') {
$command .= "--tool=helgrind ";
} else {
$command .= "--tool=memcheck --track-origins=yes --leak-check=full ";
}
$command .= "$NAMED -m none ";
if ($taskset) {
$command = "taskset $taskset $NAMED ";
} else {
if ($taskset) {
$command = "taskset $taskset $NAMED ";
} else {
$command = "$NAMED ";
}
$command = "$NAMED ";
}
my $args_file = $testdir . "/" . $server . "/" . "named.args";

View File

@@ -260,6 +260,28 @@ AC_COMPILE_IFELSE(
AC_DEFINE([URCU_INLINE_SMALL_FUNCTIONS], [1], [Inline small (less than 10 lines) functions])],
[AC_MSG_RESULT([no])])
# rr chaos mode is not included in pairwise testing as rr is not
# present in the relevant Docker image.
AC_ARG_ENABLE([rr-chaos-mode],
[AS_HELP_STRING([--enable-rr-chaos-mode],
[Use rr chaos mode to find intermittent bugs (default=no)])],
[],
[enable_rr_chaos_mode=no])
TEST_TOOL_PREFIX=
AC_MSG_CHECKING([whether to enable rr chaos mode])
AS_CASE([$enable_rr_chaos_mode],
[no],[AC_MSG_RESULT([no])],
[yes],[
AC_MSG_RESULT([yes])
TEST_TOOL_PREFIX="rr record --chaos"
],
[
AC_MSG_RESULT([yes, $enable_rr_chaos_mode])
TEST_TOOL_PREFIX="$enable_rr_chaos_mode"
])
AC_SUBST([TEST_TOOL_PREFIX])
# Fuzzing is not included in pairwise testing as fuzzing tools are
# not present in the relevant Docker image.
#