From b1fc4f7dee063cdbe38bbf244d859da82977a7ca Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Fri, 12 Jan 2024 17:06:19 +0100 Subject: [PATCH] Drop queryperf support from rpz system test The queryperf support in the rpz system test is not utilized in the CI, is likely not unused at all, and should be dropped. (cherry picked from commit eaab79631095f06127bb8ba687fc4bcb8e916d3e) --- bin/tests/system/rpz/qperf.sh | 22 --------------- bin/tests/system/rpz/setup.sh | 28 ------------------- bin/tests/system/rpz/tests.sh | 51 ----------------------------------- 3 files changed, 101 deletions(-) delete mode 100644 bin/tests/system/rpz/qperf.sh diff --git a/bin/tests/system/rpz/qperf.sh b/bin/tests/system/rpz/qperf.sh deleted file mode 100644 index 1ec64fe435..0000000000 --- a/bin/tests/system/rpz/qperf.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -for QDIR in $(echo "$PATH" | tr : ' ') ../../../../contrib/queryperf; do - QPERF=$QDIR/queryperf - if test -f "$QPERF" -a -x "$QPERF"; then - echo $QPERF - exit 0 - fi -done - -exit 0 diff --git a/bin/tests/system/rpz/setup.sh b/bin/tests/system/rpz/setup.sh index 16642be96e..d1528e85ee 100644 --- a/bin/tests/system/rpz/setup.sh +++ b/bin/tests/system/rpz/setup.sh @@ -17,8 +17,6 @@ set -e . ../conf.sh -QPERF=$($SHELL qperf.sh) - $SHELL clean.sh for dir in ns*; do @@ -118,32 +116,6 @@ a3-17.tld2 500 A 17.17.17.17 ns1.x.rpz-nsdname CNAME . EOF -if test -n "$QPERF"; then - # Do not build the full zones if we will not use them. - $PERL -e 'for ($val = 1; $val <= 65535; ++$val) { - printf("host-%05d\tA 192.168.%d.%d\n", $val, $val/256, $val%256); - }' >>ns5/example.db - - echo >>ns5/bl.db - echo "; rewrite some names" >>ns5/bl.db - $PERL -e 'for ($val = 2; $val <= 65535; $val += 69) { - printf("host-%05d.example.tld5\tCNAME\t.\n", $val); - }' >>ns5/bl.db - - echo >>ns5/bl.db - echo "; rewrite with some not entirely trivial patricia trees" >>ns5/bl.db - $PERL -e 'for ($val = 3; $val <= 65535; $val += 69) { - printf("32.%d.%d.168.192.rpz-ip \tCNAME\t.\n", - $val%256, $val/256); - }' >>ns5/bl.db -fi - -# some psuedo-random queryperf requests -$PERL -e 'for ($cnt = $val = 1; $cnt <= 3000; ++$cnt) { - printf("host-%05d.example.tld5 A\n", $val); - $val = ($val * 9 + 32771) % 65536; - }' >ns5/requests - cp ns2/bl.tld2.db.in ns2/bl.tld2.db cp ns5/empty.db.in ns5/empty.db cp ns5/empty.db.in ns5/policy2.db diff --git a/bin/tests/system/rpz/tests.sh b/bin/tests/system/rpz/tests.sh index 6d22bb353e..575cac4cd7 100644 --- a/bin/tests/system/rpz/tests.sh +++ b/bin/tests/system/rpz/tests.sh @@ -708,57 +708,6 @@ done end_group ckstats $ns3 bugs ns3 8 -# superficial test for major performance bugs -QPERF=$(sh qperf.sh) -if test -n "$QPERF"; then - perf() { - date "+${TS}checking performance $1" | cat_i - # Dry run to prime everything - comment "before dry run $1" - $RNDCCMD $ns5 notrace - $QPERF -c -1 -l30 -d ns5/requests -s $ns5 -p ${PORT} >/dev/null - comment "before real test $1" - PFILE="ns5/$2.perf" - $QPERF -c -1 -l30 -d ns5/requests -s $ns5 -p ${PORT} >$PFILE - comment "after test $1" - X=$(sed -n -e 's/.*Returned *\([^ ]*:\) *\([0-9]*\) .*/\1\2/p' $PFILE \ - | tr '\n' ' ') - if test "$X" != "$3"; then - setret "wrong results '$X' in $PFILE" - fi - ckalive $ns5 "failed; server #5 crashed" - } - trim() { - sed -n -e 's/.*Queries per second: *\([0-9]*\).*/\1/p' ns5/$1.perf - } - - # get qps with rpz - perf 'with RPZ' rpz 'NOERROR:2900 NXDOMAIN:100 ' - RPZ=$(trim rpz) - # turn off rpz and measure qps again - echo "# RPZ off" >ns5/rpz-switch - RNDCCMD_OUT=$($RNDCCMD $ns5 reload) - perf 'without RPZ' norpz 'NOERROR:3000 ' - NORPZ=$(trim norpz) - - PERCENT=$(((RPZ * 100 + (NORPZ / 2)) / NORPZ)) - echo_i "$RPZ qps with RPZ is $PERCENT% of $NORPZ qps without RPZ" - - MIN_PERCENT=30 - if test "$PERCENT" -lt $MIN_PERCENT; then - echo_i "$RPZ qps with rpz or $PERCENT% is below $MIN_PERCENT% of $NORPZ qps" - fi - - if test "$PERCENT" -ge 100; then - echo_i "$RPZ qps with RPZ or $PERCENT% of $NORPZ qps without RPZ is too high" - fi - - ckstats $ns5 performance ns5 200 - -else - echo_i "performance not checked; queryperf not available" -fi - if [ "$MODE" = dnsrps ]; then echo_i "checking that dnsrpzd is automatically restarted" OLD_PID=$(cat dnsrpzd.pid)