From 658d62a6f49b0322c02f162d55468a5e7af0869f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 9 Mar 2022 11:28:06 +0100 Subject: [PATCH 1/4] Remove support for running system tests under Valgrind Valgrind support has been scarcely used. --- bin/tests/system/start.pl | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/bin/tests/system/start.pl b/bin/tests/system/start.pl index 9253831782..38ceb6e6b3 100755 --- a/bin/tests/system/start.pl +++ b/bin/tests/system/start.pl @@ -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"; From e088e8a992008ba5e0dc1c540f808a03e69cd619 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Wed, 8 Nov 2023 19:21:30 +0100 Subject: [PATCH 2/4] Add support for recording named runtime with rr The traces of the named process are stored in the directory $system_test/nsX/named-Y/. --- bin/tests/system/README.md | 7 +++++++ bin/tests/system/start.pl | 3 +++ 2 files changed, 10 insertions(+) diff --git a/bin/tests/system/README.md b/bin/tests/system/README.md index 1d4d4f7b66..b4e6f4ed55 100644 --- a/bin/tests/system/README.md +++ b/bin/tests/system/README.md @@ -114,6 +114,13 @@ Alternately, using the make command is also supported: make [-j numproc] test +### rr + +When running system tests, named can be run under the rr tool. rr records a +trace to the $system_test/nsX/named-Y/ directory, which can be later used to +replay named. To enable this, execute start.pl with the USE_RR environment +variable set. + ### Test Artifacts Each test module is executed inside a unique temporary directory which contains diff --git a/bin/tests/system/start.pl b/bin/tests/system/start.pl index 38ceb6e6b3..32d2074168 100755 --- a/bin/tests/system/start.pl +++ b/bin/tests/system/start.pl @@ -232,6 +232,9 @@ sub construct_ns_command { if ($taskset) { $command = "taskset $taskset $NAMED "; + } elsif ($ENV{'USE_RR'}) { + $ENV{'_RR_TRACE_DIR'} = "."; + $command = "rr record --chaos $NAMED "; } else { $command = "$NAMED "; } From 920af590d155fc110df2c434e90fd0b029a541cb Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Wed, 8 Nov 2023 18:46:20 +0100 Subject: [PATCH 3/4] Fix process listing string of rpzextra ns3 server --- bin/tests/system/rpzextra/ns3/named.args | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/rpzextra/ns3/named.args b/bin/tests/system/rpzextra/ns3/named.args index 7b5a9edf70..76936389a6 100644 --- a/bin/tests/system/rpzextra/ns3/named.args +++ b/bin/tests/system/rpzextra/ns3/named.args @@ -1 +1 @@ - -m record -c named.conf -d 99 -D rpzextra-ns1 -T maxcachesize=2097152 + -m record -c named.conf -d 99 -D rpzextra-ns3 -T maxcachesize=2097152 From 422286e9c2d459aa455fd907571d75784225d584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 16 Nov 2023 13:21:33 +0100 Subject: [PATCH 4/4] Do not daemonize named instances with custom args This enables the "logfileconfig" and "rpzextra" system tests to pass when named is started under the supervision of rr (USE_RR=1). --- bin/tests/system/logfileconfig/named1.args | 2 +- bin/tests/system/logfileconfig/named2.args | 2 +- bin/tests/system/rpzextra/ns3/named.args | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/logfileconfig/named1.args b/bin/tests/system/logfileconfig/named1.args index 37ed976379..661190488c 100644 --- a/bin/tests/system/logfileconfig/named1.args +++ b/bin/tests/system/logfileconfig/named1.args @@ -1 +1 @@ --c named.conf -m record -T nosyslog -d 99 -D logfileconfig-ns1 +-c named.conf -m record -T nosyslog -f -d 99 -D logfileconfig-ns1 diff --git a/bin/tests/system/logfileconfig/named2.args b/bin/tests/system/logfileconfig/named2.args index 45347fc1b7..e2b5a482b4 100644 --- a/bin/tests/system/logfileconfig/named2.args +++ b/bin/tests/system/logfileconfig/named2.args @@ -1 +1 @@ --c named.conf -m record -T nosyslog -d 99 -D logfileconfig-ns1 -L named_deflog +-c named.conf -m record -T nosyslog -f -d 99 -D logfileconfig-ns1 -L named_deflog diff --git a/bin/tests/system/rpzextra/ns3/named.args b/bin/tests/system/rpzextra/ns3/named.args index 76936389a6..f4fe28fd83 100644 --- a/bin/tests/system/rpzextra/ns3/named.args +++ b/bin/tests/system/rpzextra/ns3/named.args @@ -1 +1 @@ - -m record -c named.conf -d 99 -D rpzextra-ns3 -T maxcachesize=2097152 + -m record -c named.conf -d 99 -f -D rpzextra-ns3 -T maxcachesize=2097152