diff --git a/bin/tests/system/rrchecker/classlist.good b/bin/tests/system/rrchecker/classlist.good deleted file mode 100644 index f0fff1a93a..0000000000 --- a/bin/tests/system/rrchecker/classlist.good +++ /dev/null @@ -1,3 +0,0 @@ -IN -CH -HS diff --git a/bin/tests/system/rrchecker/clean.sh b/bin/tests/system/rrchecker/clean.sh deleted file mode 100644 index 5987b15cc5..0000000000 --- a/bin/tests/system/rrchecker/clean.sh +++ /dev/null @@ -1,14 +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. - -rm -f classlist.out privatelist.out typelist.out tempzone checkzone.out* checker.out diff --git a/bin/tests/system/rrchecker/privatelist.good b/bin/tests/system/rrchecker/privatelist.good deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/bin/tests/system/rrchecker/tests.sh b/bin/tests/system/rrchecker/tests.sh deleted file mode 100644 index 0edf303d76..0000000000 --- a/bin/tests/system/rrchecker/tests.sh +++ /dev/null @@ -1,98 +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. - -set -e - -. ../conf.sh - -status=0 -n=0 - -n=$((n + 1)) -echo_i "class list ($n)" -$RRCHECKER -C >classlist.out -diff classlist.out classlist.good || { - echo_i "failed" - status=$((status + 1)) -} - -n=$((n + 1)) -echo_i "type list ($n)" -$RRCHECKER -T >typelist.out -diff typelist.out typelist.good || { - echo_i "failed" - status=$((status + 1)) -} - -n=$((n + 1)) -echo_i "private type list ($n)" -$RRCHECKER -P >privatelist.out -diff privatelist.out privatelist.good || { - echo_i "failed" - status=$((status + 1)) -} - -myecho() { - cat <tempzone -$CHECKZONE -Dq . tempzone | sed '/^;/d' >checkzone.out$n -while read -r name tt cl ty rest; do - myecho "$cl $ty $rest" | $RRCHECKER -p >checker.out || { - ret=1 - echo_i "'$cl $ty $rest' not handled." - } - read -r cl0 ty0 rest0 checkzone.out$n -while read -r name tt cl ty rest; do - myecho "$cl $ty $rest" | $RRCHECKER -u >checker.out || { - ret=1 - echo_i "'$cl $ty $rest' not converted to unknown record format" - } - read -r clu tyu restu checker.out || { - ret=1 - echo_i "'$cl $ty $rest' not converted back to canonical format" - } - read -r cl0 ty0 rest0 = 4, f"invalid rr: {rr}" + rr_class_orig, rr_type_orig, rr_rest_orig = ( + rr_parts_orig[2], + rr_parts_orig[3], + " ".join(rr_parts_orig[4:]), + ) + rr_class, rr_type, rr_rest = rr_class_orig, rr_type_orig, rr_rest_orig + if option == "-u": + rr_class, rr_type, *rr_rest = run_rrchecker( + "-u", rr_class_orig, rr_type_orig, rr_rest_orig + ) + rr_rest = " ".join(rr_rest) + + rr_class, rr_type, *rr_rest = run_rrchecker("-p", rr_class, rr_type, rr_rest) + + assert rr_class_orig == rr_class + assert rr_type_orig == rr_type + assert rr_rest_orig == " ".join(rr_rest) diff --git a/bin/tests/system/rrchecker/tests_sh_rrchecker.py b/bin/tests/system/rrchecker/tests_sh_rrchecker.py deleted file mode 100644 index 16368e7c82..0000000000 --- a/bin/tests/system/rrchecker/tests_sh_rrchecker.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. - - -def test_rrchecker(run_tests_sh): - run_tests_sh() diff --git a/bin/tests/system/rrchecker/typelist.good b/bin/tests/system/rrchecker/typelist.good deleted file mode 100644 index 506bfa0686..0000000000 --- a/bin/tests/system/rrchecker/typelist.good +++ /dev/null @@ -1,82 +0,0 @@ -A -NS -MD -MF -CNAME -SOA -MB -MG -MR -NULL -WKS -PTR -HINFO -MINFO -MX -TXT -RP -AFSDB -X25 -ISDN -RT -NSAP -NSAP-PTR -SIG -KEY -PX -GPOS -AAAA -LOC -NXT -EID -NIMLOC -SRV -ATMA -NAPTR -KX -CERT -A6 -DNAME -SINK -APL -DS -SSHFP -IPSECKEY -RRSIG -NSEC -DNSKEY -DHCID -NSEC3 -NSEC3PARAM -TLSA -SMIMEA -HIP -NINFO -RKEY -TALINK -CDS -CDNSKEY -OPENPGPKEY -CSYNC -ZONEMD -SVCB -HTTPS -SPF -UINFO -UID -GID -UNSPEC -NID -L32 -L64 -LP -EUI48 -EUI64 -URI -CAA -AVC -DOA -AMTRELAY -RESINFO -TA -DLV