diff --git a/bin/tests/system/acl/clean.sh b/bin/tests/system/acl/clean.sh deleted file mode 100644 index 3bbdabc86a..0000000000 --- a/bin/tests/system/acl/clean.sh +++ /dev/null @@ -1,25 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f dig.out.* -rm -f ns2/example.db ns2/tsigzone.db ns2/example.db.jnl -rm -f */named.conf -rm -f */named.memstats -rm -f */named.run -rm -f ns*/_default.nzf -rm -f ns*/_default.nzd* -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/acl/tests_sh_acl.py b/bin/tests/system/acl/tests_sh_acl.py index 2c98644e01..9a6bc91e39 100644 --- a/bin/tests/system/acl/tests_sh_acl.py +++ b/bin/tests/system/acl/tests_sh_acl.py @@ -9,6 +9,18 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out*", + "ns*/_default.nzd*", + "ns*/_default.nzf*", + "ns2/example.db", + "ns2/tsigzone.db", + ] +) + def test_acl(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/additional/clean.sh b/bin/tests/system/additional/clean.sh deleted file mode 100644 index b230bf2660..0000000000 --- a/bin/tests/system/additional/clean.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. - -# -# Clean up after tests. -# - -rm -f dig.out.* -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/additional/tests_sh_additional.py b/bin/tests/system/additional/tests_sh_additional.py index cdc38f4d81..b467f801ee 100644 --- a/bin/tests/system/additional/tests_sh_additional.py +++ b/bin/tests/system/additional/tests_sh_additional.py @@ -9,6 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + ] +) + def test_additional(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/addzone/clean.sh b/bin/tests/system/addzone/clean.sh deleted file mode 100644 index 57056cc2e6..0000000000 --- a/bin/tests/system/addzone/clean.sh +++ /dev/null @@ -1,43 +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 ./dig.out.* -rm -f ./rndc.out* -rm -f ./showzone.out* -rm -f ./zonestatus.out* -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./ns1/*.nzf ./ns1/*.nzf~ -rm -f ./ns1/*.nzd ./ns1/*.nzd-lock -rm -f ./ns2/*.nzf ./ns2/*.nzf~ -rm -f ./ns2/*.nzd ./ns2/*.nzd-lock -rm -f ./ns3/*.nzf ./ns3/*.nzf~ -rm -f ./ns3/*.nzd ./ns3/*.nzd-lock -rm -f ./ns2/core* -rm -f ./ns2/inline.db.jbk -rm -f ./ns2/inline.db.signed -rm -f ./ns2/inlinesec.bk* -rm -rf ./ns2/new-zones -rm -f ./ns*/named.run ./ns*/named.run.prev -rm -f ./ns2/nzf-* -rm -f ./ns3/named.conf -rm -f ./ns3/*.nzf ./ns3/*.nzf~ -rm -f ./ns3/*.nzd ns3/*.nzd-lock -rm -f ./ns3/inlinesec.db -rm -f ./ns1/redirect.db -rm -f ./ns2/redirect.db -rm -f ./ns2/redirect.bk -rm -f ./ns3/redirect.db -rm -f ./ns*/managed-keys.bind* ns*/*.mkeys* -rm -f ./nzd2nzf.out.* -rm -f ./wait_for_message.* diff --git a/bin/tests/system/addzone/tests_rndc_deadlock.py b/bin/tests/system/addzone/tests_rndc_deadlock.py index 78fa11a095..3b987d3912 100755 --- a/bin/tests/system/addzone/tests_rndc_deadlock.py +++ b/bin/tests/system/addzone/tests_rndc_deadlock.py @@ -12,8 +12,21 @@ import concurrent.futures import time +import pytest + import isctest +pytestmark = pytest.mark.extra_artifacts( + [ + "ns*/*.nzf*", + "ns*/*.nzd*", + "ns1/redirect.db", + "ns2/new-zones", + "ns2/redirect.db", + "ns3/redirect.db", + ] +) + def rndc_loop(test_state, domain, ns3): """ diff --git a/bin/tests/system/addzone/tests_sh_addzone.py b/bin/tests/system/addzone/tests_sh_addzone.py index dca8e7415c..4ca4440c04 100644 --- a/bin/tests/system/addzone/tests_sh_addzone.py +++ b/bin/tests/system/addzone/tests_sh_addzone.py @@ -9,6 +9,35 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.out*", + "showzone.out.*", + "zonestatus.out.*", + "ns*/*.nzd*", + "ns*/*.nzf*", + "ns1/redirect.db", + "nzd2nzf.out.*", + "ns2/*.nzf~", + "ns2/K*.key", + "ns2/K*.private", + "ns2/K*.state", + "ns2/external.nzd", + "ns2/extra.nzd", + "ns2/inline.db.jbk", + "ns2/inline.db.signed", + "ns2/inline.db.signed.jnl", + "ns2/inlinesec.bk.jbk", + "ns2/new-zones", + "ns2/redirect.bk", + "ns2/redirect.db", + "ns3/redirect.db", + ] +) + def test_addzone(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/allow-query/clean.sh b/bin/tests/system/allow-query/clean.sh deleted file mode 100644 index c12009ef51..0000000000 --- a/bin/tests/system/allow-query/clean.sh +++ /dev/null @@ -1,23 +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. - -# -# Clean up after allow query tests. -# - -rm -f dig.out.* -rm -f ns*/named.conf -rm -f ns2/controls.conf -rm -f */named.memstats -rm -f ns*/named.run ns*/named.run.prev -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/allow-query/tests_sh_allow_query.py b/bin/tests/system/allow-query/tests_sh_allow_query.py index 7b22ee2899..0a17c7eea5 100644 --- a/bin/tests/system/allow-query/tests_sh_allow_query.py +++ b/bin/tests/system/allow-query/tests_sh_allow_query.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns2/controls.conf", + ] +) + def test_allow_query(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/auth/clean.sh b/bin/tests/system/auth/clean.sh deleted file mode 100644 index 5fb37aca02..0000000000 --- a/bin/tests/system/auth/clean.sh +++ /dev/null @@ -1,20 +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 */named.memstats -rm -f */named.run -rm -f */named.conf -rm -f dig.out.test* -rm -f ns2/example.com.bk -rm -f ns2/example.net.bk -rm -f ns*/managed-keys.bind* ns*/*mkeys* diff --git a/bin/tests/system/auth/tests_sh_auth.py b/bin/tests/system/auth/tests_sh_auth.py index 97233fa27d..3340bcbfe6 100644 --- a/bin/tests/system/auth/tests_sh_auth.py +++ b/bin/tests/system/auth/tests_sh_auth.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.test*", + "ns*/example.*.bk", + ] +) + def test_auth(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/autosign/clean.sh b/bin/tests/system/autosign/clean.sh deleted file mode 100644 index a97d5f076b..0000000000 --- a/bin/tests/system/autosign/clean.sh +++ /dev/null @@ -1,76 +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 ./dsset-* -rm -f */K* */dsset-* */*.signed */tmp* */*.jnl */*.bk -rm -f */core -rm -f */example.bk -rm -f */named.conf -rm -f */named.memstats -rm -f */named.run* -rm -f */trusted.conf */private.conf -rm -f dig.out.* -rm -f digcomp.out.test* -rm -f activate-now-publish-1day.key prepub.key -rm -f active.key inact.key del.key delzsk.key unpub.key standby.key rev.key -rm -f delayksk.key delayzsk.key autoksk.key autozsk.key -rm -f noksk-ksk.key nozsk-ksk.key nozsk-zsk.key inaczsk-zsk.key inaczsk-ksk.key -rm -f nopriv.key vanishing.key del1.key del2.key -rm -rf ns*/inactive -rm -f ns*/managed-keys.bind* -rm -f ns1/root.db ns1/root.db.1 ns1/root.db.2 ns1/root.db.3 -rm -f ns1/signing.out -rm -f ns2/bar.db -rm -f ns2/child.nsec3.example.db -rm -f ns2/child.optout.example.db -rm -f ns2/example.db -rm -f ns2/insecure.secure.example.db -rm -f ns2/nsec3-with-ent.db -rm -f ns2/private.secure.example.db -rm -f ns2/signing.* -rm -f ns3/*.nzd ns3/*.nzd-lock ns3/*.nzf -rm -f ns3/*.nzf -rm -f ns3/*.jbk -rm -f ns3/autonsec3.example.db -rm -f ns3/delay.example.db ns3/delay.example.1 ns3/delay.example.2 -rm -f ns3/delzsk.example.db -rm -f ns3/dname-at-apex-nsec3.example.db -rm -f ns3/inaczsk2.example.db -rm -f ns3/jitter.nsec3.example.db -rm -f ns3/kg.out ns3/s.out ns3/st.out -rm -f ns3/kskonly.example.db -rm -f ns3/named.ns3.prev -rm -f ns3/noksk.example.db -rm -f ns3/nozsk.example.db ns3/inaczsk.example.db -rm -f ns3/nsec-only.example.db -rm -f ns3/nsec3-to-nsec.example.db -rm -f ns3/nsec3.example.db -rm -f ns3/nsec3.nsec3.example.db -rm -f ns3/nsec3.optout.example.db -rm -f ns3/oldsigs.example.db ns3/oldsigs.example.db.bak -rm -f ns3/optout.example.db -rm -f ns3/optout.nsec3.example.db -rm -f ns3/optout.optout.example.db -rm -f ns3/prepub.example.db -rm -f ns3/reconf.example.db -rm -f ns3/rsasha256.example.db ns3/rsasha512.example.db -rm -f ns3/secure.example.db -rm -f ns3/secure.nsec3.example.db -rm -f ns3/secure.optout.example.db -rm -f ns3/settime.out.* -rm -f ns3/sync.example.db -rm -f ns3/ttl*.db -rm -f nsupdate.out.test* -rm -f settime.out.* -rm -f signing.* -rm -f sync.key diff --git a/bin/tests/system/autosign/tests_sh_autosign.py b/bin/tests/system/autosign/tests_sh_autosign.py index b0399063b3..b373e03b6a 100644 --- a/bin/tests/system/autosign/tests_sh_autosign.py +++ b/bin/tests/system/autosign/tests_sh_autosign.py @@ -9,9 +9,147 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest import isctest.mark +pytestmark = pytest.mark.extra_artifacts( + [ + "active.key", + "activate-now-publish-1day.key", + "autoksk.key", + "autozsk.key", + "del.key", + "delayksk.key", + "delayzsk.key", + "delzsk.key", + "dig.out.*", + "dsset-.", + "dsset-bar.", + "dsset-delay.example.", + "inact.key", + "inaczsk-ksk.key", + "inaczsk-zsk.key", + "noksk-ksk.key", + "nopriv.key", + "nozsk-ksk.key", + "nozsk-zsk.key", + "nsupdate.out.*", + "prepub.key", + "rev.key", + "settime.out.*", + "signing.*out*", + "standby.key", + "sync.key", + "unpub.key", + "vanishing.key", + "*/K*", + "*/dsset-*", + "*/*.signed", + "*/*.jnl", + "*/*.bk", + "ns*/_default.nzf*", + "ns*/_default.nzd*", + "ns1/root.db", + "ns1/root.db.1", + "ns1/root.db.2", + "ns1/root.db.3", + "ns1/signing.out", + "ns1/trusted.conf", + "ns2/bar.db", + "ns2/child.nsec3.example.db", + "ns2/child.optout.example.db", + "ns2/dsset-dname-at-apex-nsec3.example.", + "ns2/dsset-example.", + "ns2/dsset-nsec3-to-nsec.example.", + "ns2/dsset-nsec3.example.", + "ns2/dsset-oldsigs.example.", + "ns2/dsset-optout.example.", + "ns2/dsset-private.secure.example.", + "ns2/dsset-rsasha256.example.", + "ns2/dsset-rsasha512.example.", + "ns2/dsset-secure.example.", + "ns2/example.db", + "ns2/insecure.secure.example.db", + "ns2/nsec3-with-ent.db", + "ns2/private.conf", + "ns2/private.secure.example.db", + "ns2/signing.bar.out", + "ns2/signing.privsec.out", + "ns2/trusted.conf", + "ns3/autonsec3.example.db", + "ns3/delay.example.1", + "ns3/delay.example.2", + "ns3/delay.example.db", + "ns3/delzsk.example.db", + "ns3/dname-at-apex-nsec3.example.db", + "ns3/dsset-autonsec3.example.", + "ns3/dsset-dname-at-apex-nsec3.example.", + "ns3/dsset-inaczsk.example.", + "ns3/dsset-inaczsk2.example.", + "ns3/dsset-kskonly.example.", + "ns3/dsset-noksk.example.", + "ns3/dsset-nozsk.example.", + "ns3/dsset-nsec-only.example.", + "ns3/dsset-nsec3-to-nsec.example.", + "ns3/dsset-nsec3-to-nsec3.example.", + "ns3/dsset-nsec3.example.", + "ns3/dsset-nsec3.nsec3.example.", + "ns3/dsset-nsec3.optout.example.", + "ns3/dsset-oldsigs.example.", + "ns3/dsset-optout.example.", + "ns3/dsset-optout.nsec3.example.", + "ns3/dsset-optout.optout.example.", + "ns3/dsset-prepub.example.", + "ns3/dsset-rsasha256.example.", + "ns3/dsset-rsasha512.example.", + "ns3/dsset-secure.example.", + "ns3/dsset-secure.nsec3.example.", + "ns3/dsset-secure.optout.example.", + "ns3/dsset-sync.example.", + "ns3/inactive", + "ns3/inaczsk.example.db", + "ns3/inaczsk2.example.db", + "ns3/jitter.nsec3.example.db", + "ns3/kg.out", + "ns3/kskonly.example.db", + "ns3/kskonly.example.db.jbk", + "ns3/noksk.example.db", + "ns3/nozsk.example.db", + "ns3/nsec-only.example.db", + "ns3/nsec3-to-nsec.example.db", + "ns3/nsec3-to-nsec3.example.db", + "ns3/nsec3.example.db", + "ns3/nsec3.nsec3.example.db", + "ns3/nsec3.optout.example.db", + "ns3/oldsigs.example.db", + "ns3/oldsigs.example.db.bak", + "ns3/optout.example.db", + "ns3/optout.example.db.jbk", + "ns3/optout.nsec3.example.db", + "ns3/optout.optout.example.db", + "ns3/prepub.example.db", + "ns3/reconf.example.db", + "ns3/reconf.example.db.jbk", + "ns3/rsasha256.example.db", + "ns3/rsasha512.example.db", + "ns3/s.out", + "ns3/secure.example.db", + "ns3/secure.nsec3.example.db", + "ns3/secure.optout.example.db", + "ns3/st.out", + "ns3/sync.example.db", + "ns3/trusted.conf", + "ns3/ttl1.example.db", + "ns3/ttl2.example.db", + "ns3/ttl3.example.db", + "ns3/ttl4.example.db", + "ns4/private.conf", + "ns4/trusted.conf", + "ns5/trusted.conf", + ] +) + @isctest.mark.flaky(max_runs=2) def test_autosign(run_tests_sh): diff --git a/bin/tests/system/builtin/clean.sh b/bin/tests/system/builtin/clean.sh deleted file mode 100644 index a0fe02a4b1..0000000000 --- a/bin/tests/system/builtin/clean.sh +++ /dev/null @@ -1,19 +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 ns?/named.run -rm -f ns?/named.memstats -rm -f ns?/named.conf -rm -f rndc.status.ns* -rm -f dig.out.ns* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/builtin/tests_sh_builtin.py b/bin/tests/system/builtin/tests_sh_builtin.py index 2246cb4595..ff521dbfb9 100644 --- a/bin/tests/system/builtin/tests_sh_builtin.py +++ b/bin/tests/system/builtin/tests_sh_builtin.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.status.ns*", + ] +) + def test_builtin(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/cacheclean/clean.sh b/bin/tests/system/cacheclean/clean.sh deleted file mode 100644 index 75b2af32ef..0000000000 --- a/bin/tests/system/cacheclean/clean.sh +++ /dev/null @@ -1,26 +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. - -# -# Clean up after cache cleaner tests. -# - -rm -f dig.out.ns2 -rm -f dig.out.expire -rm -f rndc.out.* -rm -f sed.out.* -rm -f */named.memstats -rm -f */named.run -rm -f */named.conf -rm -f ns2/named_dump.db.* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/cacheclean/tests_sh_cacheclean.py b/bin/tests/system/cacheclean/tests_sh_cacheclean.py index e47157eb32..780e2d7d7d 100644 --- a/bin/tests/system/cacheclean/tests_sh_cacheclean.py +++ b/bin/tests/system/cacheclean/tests_sh_cacheclean.py @@ -9,6 +9,17 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.out.*", + "sed.out.*", + "ns2/named_dump.db.*", + ] +) + def test_cacheclean(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/case/clean.sh b/bin/tests/system/case/clean.sh deleted file mode 100644 index dcb88881f8..0000000000 --- a/bin/tests/system/case/clean.sh +++ /dev/null @@ -1,23 +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 dig.ns*.test* -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns1/dynamic.db -rm -f ns1/dynamic.db.jnl -rm -f ns2/dynamic.bk -rm -f ns2/dynamic.bk.jnl -rm -f ns2/example.bk -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/case/tests_sh_case.py b/bin/tests/system/case/tests_sh_case.py index bbe94d3773..90b727272d 100644 --- a/bin/tests/system/case/tests_sh_case.py +++ b/bin/tests/system/case/tests_sh_case.py @@ -9,6 +9,19 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.ns*.test*", + "ns1/dynamic.db", + "ns1/dynamic.db.jnl", + "ns2/dynamic.bk", + "ns2/dynamic.bk.jnl", + "ns2/example.bk", + ] +) + def test_case(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/catz/clean.sh b/bin/tests/system/catz/clean.sh deleted file mode 100644 index f9df1b40cb..0000000000 --- a/bin/tests/system/catz/clean.sh +++ /dev/null @@ -1,36 +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 dig.out.* -rm -f ns*/*.jnl -rm -f ns*/*.mkeys -rm -f ns*/*.nzd ns*/*.nzd-lock -rm -f ns*/*.nzf -rm -f ns*/managed-keys.bind* -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/named.run.prev -rm -f ns1/*dom*example.db -rm -f ns1/tls1.example.db -rm -f ns2/__catz__*db -rm -f ns2/catalog-bad*.db -rm -f ns2/named.conf.tmp -rm -f ns3/dom2.example.db ns3/dom13.example.db ns3/dom14.example.db ns3/dom17.example.db ns3/dom18.example.db -rm -f ns4/__catz__*db -rm -f ns4/catalog-self.example.db -rm -f ns[123]/catalog[1234].example.db -rm -f ns[14]/catalog-tls.example.db -rm -f nsupdate.out.* -rm -f wait_for_message.* -rm -rf ns2/zonedir diff --git a/bin/tests/system/catz/tests_sh_catz.py b/bin/tests/system/catz/tests_sh_catz.py index eae546fe45..639a0f3f0e 100644 --- a/bin/tests/system/catz/tests_sh_catz.py +++ b/bin/tests/system/catz/tests_sh_catz.py @@ -9,6 +9,26 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "nsupdate.out.*", + "wait_for_message.*", + "ns*/*.jnl", + "ns*/*.nzf*", + "ns*/*.nzd*", + "ns*/catalog*.example.db", + "ns*/*dom*.example.db", + "ns1/tls1.example.db", + "ns2/__catz__*.db", + "ns2/named.conf.tmp", + "ns2/zonedir", + "ns4/__catz__*.db", + ] +) + def test_catz(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/cds/clean.sh b/bin/tests/system/cds/clean.sh deleted file mode 100644 index b9743a560d..0000000000 --- a/bin/tests/system/cds/clean.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -e - -# 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 CDNSKEY* CDS* DS* -rm -f K* -rm -f UP* -rm -f brk.* -rm -f db.* -rm -f dsset-* -rm -f empty -rm -f sig.* -rm -f vars.sh -rm -f err* out* xerr xout diff --git a/bin/tests/system/cds/tests_sh_cds.py b/bin/tests/system/cds/tests_sh_cds.py index d00a8ae51c..3a99ac11ef 100644 --- a/bin/tests/system/cds/tests_sh_cds.py +++ b/bin/tests/system/cds/tests_sh_cds.py @@ -9,6 +9,27 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "CDNSKEY.*", + "CDS.*", + "DS.*", + "K*", + "UP.*", + "brk.*", + "db.*", + "empty", + "err.*", + "out.*", + "sig.*", + "vars.sh", + "xerr", + "xout", + ] +) + def test_cds(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/chain/clean.sh b/bin/tests/system/chain/clean.sh deleted file mode 100755 index 22d7e0a0f1..0000000000 --- a/bin/tests/system/chain/clean.sh +++ /dev/null @@ -1,18 +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 dig.out.* named*.pid -rm -f ns*/named.conf -rm -f */named.memstats */named.recursing */named.run */ans.run -rm -f ns2/K* ns2/dsset-* ns2/*.db.signed -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/chain/tests_sh_chain.py b/bin/tests/system/chain/tests_sh_chain.py index ca3c05794e..f7d7ac3b01 100644 --- a/bin/tests/system/chain/tests_sh_chain.py +++ b/bin/tests/system/chain/tests_sh_chain.py @@ -9,6 +9,18 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "*/ans.run", + "ns2/K*", + "ns2/dsset-*", + "ns2/*.db.signed", + ] +) + def test_chain(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/checkconf/clean.sh b/bin/tests/system/checkconf/clean.sh deleted file mode 100644 index 396fb82c77..0000000000 --- a/bin/tests/system/checkconf/clean.sh +++ /dev/null @@ -1,26 +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 bad-kasp-keydir1.conf -rm -f bad-kasp-keydir2.conf -rm -f bad-kasp-keydir3.conf -rm -f bad-kasp-keydir4.conf -rm -f bad-kasp-keydir5.conf -rm -f bad-tsig.conf -rm -f checkconf.out* -rm -f diff.out* -rm -f good-kasp.conf.in -rm -f good-server-christmas-tree.conf -rm -f good.conf good.conf.raw good.conf.out badzero.conf *.out -rm -rf keys -rm -rf test.keydir diff --git a/bin/tests/system/checkconf/tests_sh_checkconf.py b/bin/tests/system/checkconf/tests_sh_checkconf.py index 3a348ba2f8..c94a9fa9fa 100644 --- a/bin/tests/system/checkconf/tests_sh_checkconf.py +++ b/bin/tests/system/checkconf/tests_sh_checkconf.py @@ -9,6 +9,28 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "*.out", + "bad-kasp-keydir1.conf", + "bad-kasp-keydir2.conf", + "bad-kasp-keydir3.conf", + "bad-kasp-keydir4.conf", + "bad-kasp-keydir5.conf", + "bad-tsig.conf", + "badzero.conf", + "checkconf.out*", + "diff.out*", + "good-kasp.conf.in", + "good-server-christmas-tree.conf", + "good.conf", + "good.conf.raw", + "keys", + ] +) + def test_checkconf(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/checkds/clean.sh b/bin/tests/system/checkds/clean.sh deleted file mode 100644 index ec51f996dd..0000000000 --- a/bin/tests/system/checkds/clean.sh +++ /dev/null @@ -1,28 +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 - -rm -f dig.out* -rm -f ns*/named.conf ns*/named.memstats ns*/named.run* -rm -f ns*/*.jnl ns*/*.jbk -rm -f ns*/K*.private ns*/K*.key ns*/K*.state -rm -f ns*/*.keyname -rm -f ns*/dsset-* -rm -f ns*/*.db ns*/*.jnl ns*/*.jbk ns*/*.db.signed ns*/*.db.infile -rm -f ns*/keygen.out.* ns*/settime.out.* ns*/signer.out.* -rm -f ns*/managed-keys.bind* -rm -f ns*/trusted.conf -rm -f ns*/*.mkeys -rm -f ns*/zones -rm -f ./*.out diff --git a/bin/tests/system/checkds/tests_checkds.py b/bin/tests/system/checkds/tests_checkds.py index 3fd30e1c0b..7fed526907 100755 --- a/bin/tests/system/checkds/tests_checkds.py +++ b/bin/tests/system/checkds/tests_checkds.py @@ -11,6 +11,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. + from typing import NamedTuple, Tuple import os @@ -29,9 +30,29 @@ import dns.rdataclass import dns.rdatatype -pytestmark = pytest.mark.skipif( - sys.version_info < (3, 7), reason="Python >= 3.7 required [GL #3001]" -) +pytestmark = [ + pytest.mark.skipif( + sys.version_info < (3, 7), reason="Python >= 3.7 required [GL #3001]" + ), + pytest.mark.extra_artifacts( + [ + "*.out", + "ns*/*.db", + "ns*/*.db.infile", + "ns*/*.db.signed", + "ns*/*.jnl", + "ns*/*.jbk", + "ns*/*.keyname", + "ns*/dsset-*", + "ns*/K*", + "ns*/keygen.out*", + "ns*/settime.out*", + "ns*/signer.out*", + "ns*/trusted.conf", + "ns*/zones", + ] + ), +] def has_signed_apex_nsec(zone, response): diff --git a/bin/tests/system/checknames/clean.sh b/bin/tests/system/checknames/clean.sh deleted file mode 100644 index b7b4a6316a..0000000000 --- a/bin/tests/system/checknames/clean.sh +++ /dev/null @@ -1,26 +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 ns*/named.conf -rm -f dig.out.ns?.test* -rm -f nsupdate.out.test* -rm -f ns1/*.example.db -rm -f ns1/*.update.db -rm -f ns1/*.update.db.jnl -rm -f ns4/*.update.db -rm -f ns4/*.update.db.jnl -rm -f ns5/*.update.db -rm -f ns5/*.update.db.jnl -rm -f */named.memstats -rm -f */named.run -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/checknames/tests_sh_checknames.py b/bin/tests/system/checknames/tests_sh_checknames.py index e0e035b439..326a3473e7 100644 --- a/bin/tests/system/checknames/tests_sh_checknames.py +++ b/bin/tests/system/checknames/tests_sh_checknames.py @@ -9,6 +9,22 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.ns*.test*", + "nsupdate.out.*", + "ns1/*.example.db", + "ns1/*.update.db", + "ns1/*.update.db.jnl", + "ns4/*.update.db", + "ns4/*.update.db.jnl", + "ns5/*.update.db", + "ns5/*.update.db.jnl", + ] +) + def test_checknames(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/checkzone/clean.sh b/bin/tests/system/checkzone/clean.sh deleted file mode 100644 index ee6a11293f..0000000000 --- a/bin/tests/system/checkzone/clean.sh +++ /dev/null @@ -1,16 +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 test.* good1.db.raw named-compilezone -rm -f zones/bad-tsig.db -rm -f zones/zone1_*.txt diff --git a/bin/tests/system/checkzone/tests_sh_checkzone.py b/bin/tests/system/checkzone/tests_sh_checkzone.py index 87613cbb26..26134aa700 100644 --- a/bin/tests/system/checkzone/tests_sh_checkzone.py +++ b/bin/tests/system/checkzone/tests_sh_checkzone.py @@ -9,6 +9,18 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "good1.db.raw", + "named-compilezone", + "test.*", + "zones/bad-tsig.db", + "zones/zone1_*.txt", + ] +) + def test_checkzone(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/cipher-suites/clean.sh b/bin/tests/system/cipher-suites/clean.sh deleted file mode 100644 index c81c6a1bdc..0000000000 --- a/bin/tests/system/cipher-suites/clean.sh +++ /dev/null @@ -1,26 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run -rm -f ./*/named.run.prev -rm -f ./dig.out.* -rm -f ./gnutls-cli.* -rm -f ./sslyze.log.* -rm -f ./*/example*.db -rm -rf ./headers.* diff --git a/bin/tests/system/cipher-suites/tests_sh_cipher_suites.py b/bin/tests/system/cipher-suites/tests_sh_cipher_suites.py index 78095ba719..65a4b82591 100644 --- a/bin/tests/system/cipher-suites/tests_sh_cipher_suites.py +++ b/bin/tests/system/cipher-suites/tests_sh_cipher_suites.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns*/example*.db", + ] +) + def test_cipher_suites(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/cookie/clean.sh b/bin/tests/system/cookie/clean.sh deleted file mode 100644 index 0a76278707..0000000000 --- a/bin/tests/system/cookie/clean.sh +++ /dev/null @@ -1,23 +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 ns*/named.conf -rm -f dig.out.* -rm -f named.run.* -rm -f rndc.out.* -rm -f ns1/named_dump.db* -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/managed-keys.bind* -rm -f ns*/named.run.prev -rm -f ans*/ans.run ans*/ans.log diff --git a/bin/tests/system/cookie/tests_sh_cookie.py b/bin/tests/system/cookie/tests_sh_cookie.py index 2f1d029925..768f8601ed 100644 --- a/bin/tests/system/cookie/tests_sh_cookie.py +++ b/bin/tests/system/cookie/tests_sh_cookie.py @@ -9,6 +9,19 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "named.run.*", + "rndc.out.*", + "ans*/ans.run", + "ans*/query.log", + "ns1/named_dump.db*", + ] +) + def test_cookie(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/cpu/clean.sh b/bin/tests/system/cpu/clean.sh deleted file mode 100644 index cff7c61995..0000000000 --- a/bin/tests/system/cpu/clean.sh +++ /dev/null @@ -1,16 +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 - -rm -f ./named.run.* diff --git a/bin/tests/system/cpu/tests_sh_cpu.py b/bin/tests/system/cpu/tests_sh_cpu.py index 264dc27b0e..f2f30c6abd 100644 --- a/bin/tests/system/cpu/tests_sh_cpu.py +++ b/bin/tests/system/cpu/tests_sh_cpu.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "named.run.*", + "ns1/managed-keys.*", + ] +) + def test_cpu(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/database/clean.sh b/bin/tests/system/database/clean.sh deleted file mode 100644 index eda32d07ba..0000000000 --- a/bin/tests/system/database/clean.sh +++ /dev/null @@ -1,16 +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 ns1/named.conf ns1/named.run ns1/named.memstats -rm -f dig.out.* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/database/tests_sh_database.py b/bin/tests/system/database/tests_sh_database.py index b48469e3fb..62b9105f1e 100644 --- a/bin/tests/system/database/tests_sh_database.py +++ b/bin/tests/system/database/tests_sh_database.py @@ -9,6 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + ] +) + def test_database(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/dialup/tests_dialup_zone_transfer.py b/bin/tests/system/dialup/tests_dialup_zone_transfer.py index 71b8207b45..4ac0897177 100644 --- a/bin/tests/system/dialup/tests_dialup_zone_transfer.py +++ b/bin/tests/system/dialup/tests_dialup_zone_transfer.py @@ -9,11 +9,17 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import dns.message import pytest import isctest -import dns.message +pytestmark = pytest.mark.extra_artifacts( + [ + "ns2/example.bk", + "ns3/example.bk", + ] +) @pytest.mark.parametrize("ns", [2, 3]) diff --git a/bin/tests/system/digdelv/clean.sh b/bin/tests/system/digdelv/clean.sh deleted file mode 100644 index 61574ad3f2..0000000000 --- a/bin/tests/system/digdelv/clean.sh +++ /dev/null @@ -1,37 +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 - -rm -f ./anchor.* ./*/anchor.* -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run -rm -f ./ans*/ans.run -rm -f ./ans*/query.log -rm -f ./delv.out.test* -rm -f ./dig.out.*test* -rm -f ./dig.out.mm.* -rm -f ./dig.out.mn.* -rm -f ./dig.out.nm.* -rm -f ./dig.out.nn.* -rm -f ./host.out.test* -rm -f ./ns*/managed-keys.bind* -rm -f ./ns*/K* ./ns*/keyid ./ns*/keydata -rm -f ./ns1/root.db -rm -f ./ns*/dsset-* -rm -f ./ns2/example.db -rm -f ./ns2/example.tld.db -rm -f ./nslookup.out.test* -rm -f ./nsupdate.out.test* -rm -f ./yamlget.out.* diff --git a/bin/tests/system/digdelv/tests_sh_digdelv.py b/bin/tests/system/digdelv/tests_sh_digdelv.py index 2973c26a9f..5767bc1a6e 100644 --- a/bin/tests/system/digdelv/tests_sh_digdelv.py +++ b/bin/tests/system/digdelv/tests_sh_digdelv.py @@ -9,6 +9,30 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "delv.out.*", + "dig.out.*", + "host.out.*", + "nslookup.out.*", + "nsupdate.out.*", + "yamlget.out.*", + "ans*/ans.run", + "ans*/query.log", + "ns*/anchor.*", + "ns*/dsset-*", + "ns*/keydata", + "ns*/keyid", + "ns*/K*.key", + "ns*/K*.private", + "ns1/root.db", + "ns2/example.db", + "ns2/example.tld.db", + ] +) + def test_digdelv(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/dispatch/clean.sh b/bin/tests/system/dispatch/clean.sh deleted file mode 100644 index 608ec5ccf4..0000000000 --- a/bin/tests/system/dispatch/clean.sh +++ /dev/null @@ -1,16 +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 ns*/named.run ns*/named.conf ns*/named.pid ns*/managed-keys.bind* -rm -f ans*/ans.run ans*/ans.pid -rm -f ns*/named.memstats diff --git a/bin/tests/system/dispatch/tests_connreset.py b/bin/tests/system/dispatch/tests_connreset.py index 5dbab1e820..0b78fb8e0a 100644 --- a/bin/tests/system/dispatch/tests_connreset.py +++ b/bin/tests/system/dispatch/tests_connreset.py @@ -17,6 +17,12 @@ import isctest pytest.importorskip("dns") import dns.message +pytestmark = pytest.mark.extra_artifacts( + [ + "ans*/ans.run", + ] +) + def test_connreset(): msg = dns.message.make_query( diff --git a/bin/tests/system/dlzexternal/clean.sh b/bin/tests/system/dlzexternal/clean.sh deleted file mode 100644 index 4c0fc59457..0000000000 --- a/bin/tests/system/dlzexternal/clean.sh +++ /dev/null @@ -1,25 +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. - -# -# Clean up after dlzexternal tests. -# - -rm -f ns1/update.txt -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f ns1/ddns.key -rm -f dig.out* -rm -f ns1/session.key -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/dlzexternal/tests_sh_dlzexternal.py b/bin/tests/system/dlzexternal/tests_sh_dlzexternal.py index 1c0f7e5a29..e64ecda6a6 100644 --- a/bin/tests/system/dlzexternal/tests_sh_dlzexternal.py +++ b/bin/tests/system/dlzexternal/tests_sh_dlzexternal.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns1/ddns.key", + "ns1/update.txt", + ] +) + def test_dlzexternal(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/dns64/clean.sh b/bin/tests/system/dns64/clean.sh deleted file mode 100644 index 4255105384..0000000000 --- a/bin/tests/system/dns64/clean.sh +++ /dev/null @@ -1,21 +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 ns*/named.conf -rm -f ns1/K* -rm -f ns1/signed.db* -rm -f ns1/dsset-signed. -rm -f */named.memstats -rm -f */named.run -rm -f dig.out.* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/dns64/tests_sh_dns64.py b/bin/tests/system/dns64/tests_sh_dns64.py index 7eb152c7f4..a7af9cfe5e 100644 --- a/bin/tests/system/dns64/tests_sh_dns64.py +++ b/bin/tests/system/dns64/tests_sh_dns64.py @@ -9,6 +9,17 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns1/K*", + "ns1/dsset-signed.", + "ns1/signed.db*", + ] +) + def test_dns64(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/dnssec/clean.sh b/bin/tests/system/dnssec/clean.sh deleted file mode 100644 index 9a274bda61..0000000000 --- a/bin/tests/system/dnssec/clean.sh +++ /dev/null @@ -1,118 +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 - -rm -f ./K* ./*/K* ./*/keyset-* ./*/dsset-* ./*/signedkey-* ./*/*.signed -rm -f ./*/example.bk -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run ./*/named.run.prev -rm -f ./*/named.secroots -rm -f ./*/tmp* ./*/*.jnl ./*/*.bk ./*/*.jbk -rm -f ./*/trusted.conf ./*/managed.conf ./*/revoked.conf -rm -f ./Kexample.* ./Kkeygen* ./keygen*.err* -rm -f ./ans10/query.log ./ans10/ans.run -rm -f ./canonical?.* -rm -f ./delv.out* -rm -f ./delve.out* -rm -f ./dig.out.* -rm -f ./dnssectools.out* -rm -f ./dsfromkey.out.* -rm -f ./keygen.err -rm -f ./named.secroots.test* -rm -f ./ns*/*.nta -rm -f ./ns*/managed-keys.bind ./ns*/managed-keys.bind.jnl ./ns*/*.mkeys* -rm -f ./ns1/managed.key.id -rm -f ./ns1/root.db ./ns2/example.db ./ns2/managed.db ./ns2/trusted.db -rm -f ./ns1/trusted.keys -rm -f ./ns2/algroll.db -rm -f ./ns2/badparam.db ./ns2/badparam.db.bad -rm -f ./ns2/cdnskey-update.secure.db -rm -f ./ns2/cdnskey-update.secure.id -rm -f ./ns2/cdnskey-x.secure.db -rm -f ./ns2/cdnskey.secure.db -rm -f ./ns2/cds-auto.secure.db ./ns2/cds-auto.secure.db.jnl -rm -f ./ns2/cds-update.secure.db ./ns2/cds-update.secure.db.jnl -rm -f ./ns2/cds-update.secure.id -rm -f ./ns2/cds.secure.db ./ns2/cds-x.secure.db -rm -f ./ns2/in-addr.arpa.db -rm -f ./ns2/nsec3chain-test.db -rm -f ./ns2/settime.out.* -rm -f ./ns2/single-nsec3.db -rm -f ./ns2/too-many-iterations.db -rm -f ./ns2/updatecheck-kskonly.secure.* -rm -f ./ns3/NSEC ./ns3/NSEC3 -rm -f ./ns3/auto-nsec.example.db ./ns3/auto-nsec3.example.db -rm -f ./ns3/badds.example.db -rm -f ./ns3/dname-at-apex-nsec3.example.db -rm -f ./ns3/dnskey-nsec3-unknown.example.db -rm -f ./ns3/dnskey-nsec3-unknown.example.db.tmp -rm -f ./ns3/dnskey-unknown.example.db -rm -f ./ns3/dnskey-unknown.example.db.tmp -rm -f ./ns3/dnskey-unsupported-2.example.db -rm -f ./ns3/dnskey-unsupported-2.example.db.tmp -rm -f ./ns3/dnskey-unsupported.example.db -rm -f ./ns3/dnskey-unsupported.example.db.tmp -rm -f ./ns3/dynamic.example.db ./ns3/dynamic.example.db.signed.jnl -rm -f ./ns3/expired.example.db ./ns3/update-nsec3.example.db -rm -f ./ns3/expiring.example.db -rm -f ./ns3/future.example.db ./ns3/trusted-future.key -rm -f ./ns3/inline.example.db.signed -rm -f ./ns3/kskonly.example.db -rm -f ./ns3/lower.example.db ./ns3/upper.example.db ./ns3/upper.example.db.lower -rm -f ./ns3/managed-future.example.db -rm -f ./ns3/multiple.example.db ./ns3/nsec3-unknown.example.db ./ns3/nsec3.example.db -rm -f ./ns3/nsec3.nsec3.example.db -rm -f ./ns3/nsec3.optout.example.db -rm -f ./ns3/occluded.example.db -rm -f ./ns3/optout-unknown.example.db ./ns3/optout.example.db -rm -f ./ns3/optout.nsec3.example.db -rm -f ./ns3/optout.optout.example.db -rm -f ./ns3/revkey.example.db -rm -f ./ns3/rsasha1-1024.example.tmp -rm -f ./ns3/rsasha1.example.tmp -rm -f ./ns3/rsasha256.example.db ./ns3/rsasha512.example.db -rm -f ./ns3/secure.below-cname.example.db -rm -f ./ns3/secure.example.db ./ns3/*.managed.db ./ns3/*.trusted.db -rm -f ./ns3/secure.nsec3.example.db -rm -f ./ns3/secure.optout.example.db -rm -f ./ns3/siginterval.conf -rm -f ./ns3/siginterval.example.db -rm -f ./ns3/split-dnssec.example.db -rm -f ./ns3/split-smart.example.db -rm -f ./ns3/ttlpatch.example.db ./ns3/ttlpatch.example.db.signed -rm -f ./ns3/ttlpatch.example.db.patched -rm -f ./ns3/unsecure.example.db ./ns3/bogus.example.db ./ns3/keyless.example.db -rm -f ./ns3/unsupported.managed.db.tmp ./ns3/unsupported.trusted.db.tmp -rm -f ./ns4/named_dump.db* -rm -f ./ns6/optout-tld.db -rm -f ./ns7/multiple.example.bk ./ns7/nsec3.example.bk ./ns7/optout.example.bk -rm -f ./ns7/split-rrsig.db ./ns7/split-rrsig.db.unsplit -rm -f ./nsupdate.out* -rm -f ./python.out.* -rm -f ./rndc.out.* -rm -f ./signer/*.db -rm -f ./signer/*.signed.post* -rm -f ./signer/*.signed.pre* -rm -f ./signer/example.db.after ./signer/example.db.before -rm -f ./signer/example.db.changed -rm -f ./signer/general/*.jnl -rm -f ./signer/general/dsset* -rm -f ./signer/general/signed.zone -rm -f ./signer/general/signer.err.* -rm -f ./signer/general/signer.out.* -rm -f ./signer/nsec3param.out -rm -f ./signer/signer.err.* -rm -f ./signer/signer.out.* -rm -f ./signing.out* diff --git a/bin/tests/system/dnssec/tests_sh_dnssec.py b/bin/tests/system/dnssec/tests_sh_dnssec.py index 65c3d4341f..bc2dd05ed3 100644 --- a/bin/tests/system/dnssec/tests_sh_dnssec.py +++ b/bin/tests/system/dnssec/tests_sh_dnssec.py @@ -9,6 +9,153 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "K*", + "canonical*", + "delv.out*", + "dig.out.*", + "dnssectools.out.*", + "dsfromkey.out.*", + "keygen*.err*", + "named.secroots.*", + "nsupdate.out.*", + "python.out.*", + "rndc.out.*", + "signing.out.*", + "*/K*", + "*/dsset-*", + "*/managed.conf", + "*/trusted.conf", + "*/*.bk", + "*/*.jnl", + "*/*.jbk", + "*/*.signed", + "*/*.mkeys*", + "ans*/ans.run", + "ans*/query.log", + "ns1/managed.key.id", + "ns1/root.db", + "ns1/trusted.keys", + "ns2/algroll.db", + "ns2/badparam.db", + "ns2/badparam.db.bad", + "ns2/cdnskey-update.secure.db", + "ns2/cdnskey-update.secure.id", + "ns2/cdnskey-x.secure.db", + "ns2/cdnskey.secure.db", + "ns2/cds-update.secure.db", + "ns2/cds-update.secure.id", + "ns2/cds-x.secure.db", + "ns2/cds.secure.db", + "ns2/example.db", + "ns2/in-addr.arpa.db", + "ns2/lazy-ksk.db", + "ns2/managed.db", + "ns2/nsec3chain-test.db", + "ns2/settime.out.updatecheck-kskonly.secure.ksk", + "ns2/settime.out.updatecheck-kskonly.secure.zsk", + "ns2/single-nsec3.db", + "ns2/too-many-iterations.db", + "ns2/trusted.db", + "ns2/updatecheck-kskonly.secure.ksk.id", + "ns2/updatecheck-kskonly.secure.ksk.key", + "ns2/updatecheck-kskonly.secure.zsk.id", + "ns2/updatecheck-kskonly.secure.zsk.id2", + "ns2/updatecheck-kskonly.secure.zsk.id3", + "ns2/updatecheck-kskonly.secure.zsk.key", + "ns3/NSEC", + "ns3/NSEC3", + "ns3/auto-nsec.example.db", + "ns3/auto-nsec3.example.db", + "ns3/badds.example.db", + "ns3/bogus.example.db", + "ns3/disabled.managed.db", + "ns3/disabled.trusted.db", + "ns3/dname-at-apex-nsec3.example.db", + "ns3/dnskey-nsec3-unknown.example.db", + "ns3/dnskey-nsec3-unknown.example.db.tmp", + "ns3/dnskey-unknown.example.db", + "ns3/dnskey-unknown.example.db.tmp", + "ns3/dnskey-unsupported-2.example.db", + "ns3/dnskey-unsupported.example.db", + "ns3/dnskey-unsupported.example.db.tmp", + "ns3/dynamic.example.db", + "ns3/enabled.managed.db", + "ns3/enabled.trusted.db", + "ns3/example.bk", + "ns3/expired.example.db", + "ns3/expiring.example.db", + "ns3/future.example.db", + "ns3/keyless.example.db", + "ns3/kskonly.example.db", + "ns3/lower.example.db", + "ns3/managed-future.example.db", + "ns3/multiple.example.db", + "ns3/nsec3-unknown.example.db", + "ns3/nsec3.example.db", + "ns3/nsec3.nsec3.example.db", + "ns3/nsec3.optout.example.db", + "ns3/nsec3chain-test.bk", + "ns3/occluded.example.db", + "ns3/optout-unknown.example.db", + "ns3/optout.example.db", + "ns3/optout.nsec3.example.db", + "ns3/optout.optout.example.db", + "ns3/revkey.example.db", + "ns3/revoked.managed.db", + "ns3/revoked.trusted.db", + "ns3/rfc2335.example.bk", + "ns3/rsasha256.example.db", + "ns3/rsasha512.example.db", + "ns3/secure.below-cname.example.db", + "ns3/secure.example.db", + "ns3/secure.managed.db", + "ns3/secure.nsec3.example.db", + "ns3/secure.optout.example.db", + "ns3/secure.trusted.db", + "ns3/siginterval.conf", + "ns3/siginterval.example.db", + "ns3/split-dnssec.example.db", + "ns3/split-smart.example.db", + "ns3/trusted-future.key", + "ns3/ttlpatch.example.db", + "ns3/ttlpatch.example.db.patched", + "ns3/unsupported.managed.db", + "ns3/unsupported.managed.db.tmp", + "ns3/unsupported.trusted.db", + "ns3/unsupported.trusted.db.tmp", + "ns3/update-nsec3.example.db", + "ns3/update-nsec3.example.db.signed", + "ns3/upper.example.db", + "ns3/upper.example.db.lower", + "ns4/managed.conf", + "ns4/managed-keys.bind", + "ns4/named.secroots", + "ns4/named_dump.db.*", + "ns5/revoked.conf", + "ns5/trusted.conf", + "ns6/optout-tld.db", + "ns7/split-rrsig.db", + "ns7/split-rrsig.db.unsplit", + "signer/example.db", + "signer/example.db.after", + "signer/example.db.before", + "signer/example.db.changed", + "signer/example2.db", + "signer/example3.db", + "signer/general/dsset-*", + "signer/general/signed.zone", + "signer/general/signer.out.*", + "signer/nsec3param.out", + "signer/prepub.db", + "signer/signer.err.*", + "signer/signer.out.*", + ] +) + def test_dnssec(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/dnstap/clean.sh b/bin/tests/system/dnstap/clean.sh deleted file mode 100644 index d17322c369..0000000000 --- a/bin/tests/system/dnstap/clean.sh +++ /dev/null @@ -1,29 +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 */named.conf -rm -f */named.memstats -rm -f */named.run -rm -f */named.run.prev -rm -f */named.stats -rm -f dig.out* -rm -f dnstap.* -rm -f fstrm_capture.out.* -rm -f ns*/dnstap.out -rm -f ns*/dnstap.out.save -rm -f ns*/dnstap.out.save.? -rm -f ns*/managed-keys.bind* -rm -f ns2/dnstap.out.* -rm -f ns2/example.db ns2/example.db.jnl -rm -f ns3/dnstap.out.* -rm -f ydump.out diff --git a/bin/tests/system/dnstap/tests_dnstap.py b/bin/tests/system/dnstap/tests_dnstap.py index 2b2185a6f3..6326ef06f8 100644 --- a/bin/tests/system/dnstap/tests_dnstap.py +++ b/bin/tests/system/dnstap/tests_dnstap.py @@ -22,6 +22,14 @@ import dns.message pytest.importorskip("dns", minversion="2.0.0") +pytestmark = pytest.mark.extra_artifacts( + [ + "dnstap.out.*", + "ns*/dnstap.out*", + "ns2/example.db", + ] +) + def run_rndc(server, rndc_command): """ diff --git a/bin/tests/system/dnstap/tests_sh_dnstap.py b/bin/tests/system/dnstap/tests_sh_dnstap.py index 8094f0d6c8..5d4d7a9e9e 100644 --- a/bin/tests/system/dnstap/tests_sh_dnstap.py +++ b/bin/tests/system/dnstap/tests_sh_dnstap.py @@ -9,6 +9,22 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out*", + "dnstap.hex*", + "dnstap.out*", + "fstrm_capture.out.*", + "nsupdate.out*", + "ydump.out*", + "ns*/dnstap.out*", + "ns2/example.db", + "ns2/example.db.jnl", + ] +) + def test_dnstap(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/doth/clean.sh b/bin/tests/system/doth/clean.sh deleted file mode 100644 index c81c6a1bdc..0000000000 --- a/bin/tests/system/doth/clean.sh +++ /dev/null @@ -1,26 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run -rm -f ./*/named.run.prev -rm -f ./dig.out.* -rm -f ./gnutls-cli.* -rm -f ./sslyze.log.* -rm -f ./*/example*.db -rm -rf ./headers.* diff --git a/bin/tests/system/doth/tests_gnutls.py b/bin/tests/system/doth/tests_gnutls.py index 5ddb708fd2..8770206fa8 100644 --- a/bin/tests/system/doth/tests_gnutls.py +++ b/bin/tests/system/doth/tests_gnutls.py @@ -25,6 +25,13 @@ import dns.name import dns.rdataclass import dns.rdatatype +pytestmark = pytest.mark.extra_artifacts( + [ + "gnutls-cli.*", + "ns*/example*.db", + ] +) + def test_gnutls_cli_query(gnutls_cli_executable, named_tlsport): # Prepare the example/SOA query which will be sent over TLS. diff --git a/bin/tests/system/doth/tests_sh_doth.py b/bin/tests/system/doth/tests_sh_doth.py index ef87a06acd..69e92fab4c 100644 --- a/bin/tests/system/doth/tests_sh_doth.py +++ b/bin/tests/system/doth/tests_sh_doth.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "headers.*", + "ns*/example*.db", + ] +) + def test_doth(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/doth/tests_sslyze.py b/bin/tests/system/doth/tests_sslyze.py index a904e7c12e..33d916abf2 100644 --- a/bin/tests/system/doth/tests_sslyze.py +++ b/bin/tests/system/doth/tests_sslyze.py @@ -15,9 +15,17 @@ import os import pathlib import subprocess -import isctest import pytest +import isctest + +pytestmark = pytest.mark.extra_artifacts( + [ + "sslyze.log.*", + "ns*/example*.db", + ] +) + def is_pid_alive(pid): try: diff --git a/bin/tests/system/dsdigest/clean.sh b/bin/tests/system/dsdigest/clean.sh deleted file mode 100644 index ba7d9c717f..0000000000 --- a/bin/tests/system/dsdigest/clean.sh +++ /dev/null @@ -1,21 +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 */K* */dsset-* */*.signed */trusted.conf -rm -f ns1/root.db -rm -f ns1/signer.err -rm -f ns2/good.db ns2/bad.db -rm -f */named.conf -rm -f */named.run -rm -f */named.memstats -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/dsdigest/tests_dsdigest.py b/bin/tests/system/dsdigest/tests_dsdigest.py index 3788003e27..f741a21147 100644 --- a/bin/tests/system/dsdigest/tests_dsdigest.py +++ b/bin/tests/system/dsdigest/tests_dsdigest.py @@ -10,9 +10,22 @@ # information regarding copyright ownership. import dns.message +import pytest import isctest +pytestmark = pytest.mark.extra_artifacts( + [ + "ns*/K*", + "ns*/dsset-*", + "ns*/trusted.conf", + "ns*/*.signed", + "ns1/root.db", + "ns2/bad.db", + "ns2/good.db", + ] +) + def test_dsdigest_good(): """Check that validation with enabled digest types works""" diff --git a/bin/tests/system/dyndb/clean.sh b/bin/tests/system/dyndb/clean.sh deleted file mode 100644 index cb8ae94212..0000000000 --- a/bin/tests/system/dyndb/clean.sh +++ /dev/null @@ -1,25 +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. - -# -# Clean up after dyndb tests. -# -rm -f */named.conf -rm -f */named.run -rm -f ns1/named.memstats -rm -f ns1/update.txt -rm -f added.a.out.* -rm -f added.ptr.out.* -rm -f deleted.a.out.* -rm -f deleted.ptr.out.* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/dyndb/tests_sh_dyndb.py b/bin/tests/system/dyndb/tests_sh_dyndb.py index ca8f7a1e5b..dab651d007 100644 --- a/bin/tests/system/dyndb/tests_sh_dyndb.py +++ b/bin/tests/system/dyndb/tests_sh_dyndb.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "added.*", + "deleted.*", + "ns1/update.txt", + ] +) + def test_dyndb(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/ecdsa/clean.sh b/bin/tests/system/ecdsa/clean.sh deleted file mode 100644 index 7cc30b604b..0000000000 --- a/bin/tests/system/ecdsa/clean.sh +++ /dev/null @@ -1,26 +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 - -rm -f ./dig.out* -rm -f ns*/*.signed -rm -f ns*/K* -rm -f ns*/dsset-* -rm -f ns*/managed-keys.bind* -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/root.db -rm -f ns*/signer.err -rm -f ns*/trusted.conf diff --git a/bin/tests/system/ecdsa/tests_sh_ecdsa.py b/bin/tests/system/ecdsa/tests_sh_ecdsa.py index 98b9eeec05..b264f6484d 100644 --- a/bin/tests/system/ecdsa/tests_sh_ecdsa.py +++ b/bin/tests/system/ecdsa/tests_sh_ecdsa.py @@ -9,6 +9,20 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns*/trusted.conf", + "ns1/K*", + "ns1/dsset-*", + "ns1/root.db", + "ns1/root.db.signed", + "ns1/signer.err", + ] +) + def test_ecdsa(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/eddsa/clean.sh b/bin/tests/system/eddsa/clean.sh deleted file mode 100644 index 38be2c969d..0000000000 --- a/bin/tests/system/eddsa/clean.sh +++ /dev/null @@ -1,27 +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 - -rm -f ./dig.out* -rm -f ns*/*.signed -rm -f ns*/K* -rm -f ns*/dsset-* -rm -f ns*/managed-keys.bind* -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/root.db -rm -f ns*/signer.err -rm -f ns*/trusted.conf -rm -f ns*/example.com.db diff --git a/bin/tests/system/eddsa/tests_sh_eddsa.py b/bin/tests/system/eddsa/tests_sh_eddsa.py index 6646e36791..587748ffb5 100644 --- a/bin/tests/system/eddsa/tests_sh_eddsa.py +++ b/bin/tests/system/eddsa/tests_sh_eddsa.py @@ -9,6 +9,22 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns*/*.signed", + "ns*/K*", + "ns*/dsset-*", + "ns*/signer.err", + "ns*/trusted.conf", + "ns1/root.db", + "ns2/example.com.db", + "ns3/example.com.db", + ] +) + def test_eddsa(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/ednscompliance/clean.sh b/bin/tests/system/ednscompliance/clean.sh deleted file mode 100644 index aeb90baf9b..0000000000 --- a/bin/tests/system/ednscompliance/clean.sh +++ /dev/null @@ -1,18 +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 dig.out* -rm -f ns*/named.conf -rm -f ns*/named.run -rm -f ns*/named.memstats -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/ednscompliance/tests_sh_ednscompliance.py b/bin/tests/system/ednscompliance/tests_sh_ednscompliance.py index 8eea611c18..cdd2f30163 100644 --- a/bin/tests/system/ednscompliance/tests_sh_ednscompliance.py +++ b/bin/tests/system/ednscompliance/tests_sh_ednscompliance.py @@ -9,6 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out*", + ] +) + def test_ednscompliance(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/emptyzones/clean.sh b/bin/tests/system/emptyzones/clean.sh deleted file mode 100644 index d84a12984d..0000000000 --- a/bin/tests/system/emptyzones/clean.sh +++ /dev/null @@ -1,18 +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 ns1/named.conf -rm -f ns*/named.run -rm -f ns*/named.memstats -rm -f dig.out.test* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/emptyzones/tests_sh_emptyzones.py b/bin/tests/system/emptyzones/tests_sh_emptyzones.py index 66dc9dc75d..3d4039d509 100644 --- a/bin/tests/system/emptyzones/tests_sh_emptyzones.py +++ b/bin/tests/system/emptyzones/tests_sh_emptyzones.py @@ -9,6 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + ] +) + def test_emptyzones(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/enginepkcs11/clean.sh b/bin/tests/system/enginepkcs11/clean.sh deleted file mode 100644 index 5a24ebd3da..0000000000 --- a/bin/tests/system/enginepkcs11/clean.sh +++ /dev/null @@ -1,41 +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. - -# shellcheck source=conf.sh -. ../conf.sh - -set -e - -rm -f dig.out.* -rm -f dsset-* -rm -f keyfromlabel.err.* keyfromlabel.out.* -rm -f pkcs11-tool.err.* pkcs11-tool.out.* -rm -f signer.out.* -rm -f ns*/*.kskid1 ns*/*.kskid2 ns*/*.zskid1 ns/*.zskid2 -rm -f ns*/dig.out.* -rm -f ns*/K* -rm -f ns*/keygen.out.* -rm -f ns*/named.conf ns1/named.args ns1/named.run ns1/named.memstats -rm -f ns*/pin -rm -f ns*/update.cmd.* -rm -f ns*/update.log.* -rm -f ns*/verify.out.* -rm -f ns*/zone.*.jnl ns1/zone.*.jbk -rm -f ns1/*.example.db ns1/*.example.db.signed -rm -f ns1/*.kasp.db ns1/*.kasp.db.signed -rm -f ns1/*.split.db ns1/*.split.db.signed -rm -f ns2/*.views.db ns1/*.views.db.signed -rm -rf ./ns1/keys/ -rm -rf ./ns2/keys/ - -OPENSSL_CONF= softhsm2-util --delete-token --token "softhsm2-enginepkcs11" >/dev/null 2>&1 || echo_i "softhsm2-enginepkcs11 token not found for cleaning" diff --git a/bin/tests/system/enginepkcs11/setup.sh b/bin/tests/system/enginepkcs11/setup.sh index e0dd87ae49..a2ef4e7250 100644 --- a/bin/tests/system/enginepkcs11/setup.sh +++ b/bin/tests/system/enginepkcs11/setup.sh @@ -18,6 +18,7 @@ set -e $SHELL clean.sh +OPENSSL_CONF= softhsm2-util --delete-token --token "softhsm2-enginepkcs11" >/dev/null 2>&1 || true OPENSSL_CONF= softhsm2-util --init-token --free --pin 1234 --so-pin 1234 --label "softhsm2-enginepkcs11" | awk '/^The token has been initialized and is reassigned to slot/ { print $NF }' printf '%s' "${HSMPIN:-1234}" >ns1/pin diff --git a/bin/tests/system/enginepkcs11/tests_sh_enginepkcs11.py b/bin/tests/system/enginepkcs11/tests_sh_enginepkcs11.py index 908c65cedc..66f2fd9bf8 100644 --- a/bin/tests/system/enginepkcs11/tests_sh_enginepkcs11.py +++ b/bin/tests/system/enginepkcs11/tests_sh_enginepkcs11.py @@ -9,8 +9,48 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + import isctest.mark +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "dsset-*", + "keyfromlabel.err.*", + "keyfromlabel.out.*", + "pkcs11-tool.err.*", + "pkcs11-tool.out.*", + "signer.out.*", + "ns*/dig.out.*", + "ns*/K*", + "ns*/keygen.out.*", + "ns*/update.cmd.*", + "ns*/update.log.*", + "ns*/verify.out.*", + "ns*/pin", + "ns*/zone.*.jbk", + "ns*/zone.*.jnl", + "ns*/*.kskid1", + "ns*/*.kskid2", + "ns*/*.zskid1", + "ns*/*.zskid2", + "ns1/keys", + "ns1/named.args", + "ns1/*.example.db", + "ns1/*.example.db.signed", + "ns1/*.kasp.db", + "ns1/*.kasp.db.signed", + "ns1/*.split.db", + "ns1/*.split.db.signed", + "ns1/*.weird.db", + "ns1/*.weird.db.signed", + "ns2/keys", + "ns2/*.view*.db", + "ns2/*.view*.db.signed", + ] +) + @isctest.mark.flaky(max_runs=3) # GL#4605 def test_enginepkcs11(run_tests_sh): diff --git a/bin/tests/system/fetchlimit/clean.sh b/bin/tests/system/fetchlimit/clean.sh deleted file mode 100644 index 20bbd60e1d..0000000000 --- a/bin/tests/system/fetchlimit/clean.sh +++ /dev/null @@ -1,21 +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 */named.conf */named.memstats */ans.run */named.recursing */named.run */named.run.prev -rm -f ans4/norespond -rm -f burst.input.* -rm -f dig.out* -rm -f wait_for_message.* -rm -f ns*/managed-keys.bind* -rm -f ns3/named.stats ns3/named.stats.prev ns3/named_dump.db -rm -f ns5/named.stats ns5/named.stats.prev diff --git a/bin/tests/system/fetchlimit/tests_sh_fetchlimit.py b/bin/tests/system/fetchlimit/tests_sh_fetchlimit.py index 04d3e3bf39..39dddf3062 100644 --- a/bin/tests/system/fetchlimit/tests_sh_fetchlimit.py +++ b/bin/tests/system/fetchlimit/tests_sh_fetchlimit.py @@ -9,6 +9,19 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "wait_for_message.*", + "ans*/ans.run", + "ns3/named.stats", + "ns3/named.stats.prev", + "ns5/named.stats", + ] +) + import isctest.mark diff --git a/bin/tests/system/filter-aaaa/clean.sh b/bin/tests/system/filter-aaaa/clean.sh deleted file mode 100644 index 213f196028..0000000000 --- a/bin/tests/system/filter-aaaa/clean.sh +++ /dev/null @@ -1,32 +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 ns1/K* -rm -f ns1/*.signed -rm -f ns1/signer.err -rm -f ns1/dsset-* - -rm -f */named.run -rm -f */named.conf -rm -f */named.memstats - -rm -f ns4/K* -rm -f ns4/*.signed -rm -f ns4/signer.err -rm -f ns4/dsset-* - -rm -f dig.out.* -rm -f ns*/managed-keys.bind* - -rm -f ns*/trusted.conf -rm -f ns*/keygen.out diff --git a/bin/tests/system/filter-aaaa/tests_sh_filter_aaaa.py b/bin/tests/system/filter-aaaa/tests_sh_filter_aaaa.py index bc6a90df73..6e1df65811 100644 --- a/bin/tests/system/filter-aaaa/tests_sh_filter_aaaa.py +++ b/bin/tests/system/filter-aaaa/tests_sh_filter_aaaa.py @@ -9,6 +9,23 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns*/trusted.conf", + "ns1/K*", + "ns1/dsset-*", + "ns1/*.signed", + "ns1/signer.err", + "ns4/K*", + "ns4/dsset-*", + "ns4/*.signed", + "ns4/signer.err", + ] +) + def test_filter_aaaa(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/formerr/clean.sh b/bin/tests/system/formerr/clean.sh deleted file mode 100644 index 886771b26f..0000000000 --- a/bin/tests/system/formerr/clean.sh +++ /dev/null @@ -1,36 +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 badnsec3owner.out -rm -f badrecordname.out -rm -f dupans.out -rm -f dupquestion.out -rm -f keyclass.out -rm -f malformeddeltype.out -rm -f malformedrrsig.out -rm -f nametoolong.out -rm -f noquestions.out -rm -f optwrongname.out -rm -f ns*/managed-keys.bind* -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f qtypeasanswer.out -rm -f questionclass.out -rm -f shortquestion.out -rm -f shortrecord.out -rm -f tsignotlast.out -rm -f tsigwrongclass.out -rm -f twoquestionnames.out -rm -f twoquestiontypes.out -rm -f wrongclass.out diff --git a/bin/tests/system/formerr/tests_sh_formerr.py b/bin/tests/system/formerr/tests_sh_formerr.py index 73638561fb..a091546d51 100644 --- a/bin/tests/system/formerr/tests_sh_formerr.py +++ b/bin/tests/system/formerr/tests_sh_formerr.py @@ -9,6 +9,32 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "badnsec3owner.out", + "badrecordname.out", + "dupans.out", + "dupquestion.out", + "keyclass.out", + "malformeddeltype.out", + "malformedrrsig.out", + "nametoolong.out", + "noquestions.out", + "optwrongname.out", + "qtypeasanswer.out", + "questionclass.out", + "shortquestion.out", + "shortrecord.out", + "tsignotlast.out", + "tsigwrongclass.out", + "twoquestionnames.out", + "twoquestiontypes.out", + "wrongclass.out", + ] +) + def test_formerr(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/forward/clean.sh b/bin/tests/system/forward/clean.sh deleted file mode 100644 index bf9cc7b577..0000000000 --- a/bin/tests/system/forward/clean.sh +++ /dev/null @@ -1,31 +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. - -# -# Clean up after forward tests. -# -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run ./*/named.run.prev ./*/ans.run -rm -f ./*/named_dump.db -rm -f ./ans*/query.log -rm -f ./statschannel.out.* -rm -f ./dig.out.* -rm -f ./ns*/managed-keys.bind* -rm -f ./ns*/trusted.conf -rm -f ./ns1/K* ./ns1/dsset-* -rm -f ./ns1/root.db ./ns1/root.db.signed -rm -f ns2/named-tls.conf -rm -f ns2/options-tls.conf -rm -f ns4/named-tls.conf -rm -f ns4/options-tls.conf diff --git a/bin/tests/system/forward/tests_sh_forward.py b/bin/tests/system/forward/tests_sh_forward.py index 4380a498bf..9701cb733c 100644 --- a/bin/tests/system/forward/tests_sh_forward.py +++ b/bin/tests/system/forward/tests_sh_forward.py @@ -9,6 +9,28 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "statschannel.out.*", + "ans*/ans.run", + "ans*/query.log", + "ns*/trusted.conf", + "ns1/K*", + "ns1/dsset-*", + "ns1/root.db", + "ns1/root.db.signed", + "ns2/named-tls.conf", + "ns2/options-tls.conf", + "ns3/trusted.conf", + "ns4/named-tls.conf", + "ns4/options-tls.conf", + "ns9/named_dump.db", + ] +) + def test_forward(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/geoip2/clean.sh b/bin/tests/system/geoip2/clean.sh deleted file mode 100644 index 0a512ff75b..0000000000 --- a/bin/tests/system/geoip2/clean.sh +++ /dev/null @@ -1,19 +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 ns2/named.conf -rm -f ns2/example*.db -rm -f dig.out.* rndc.out.* -rm -f ns?/named.run -rm -f ns?/named.memstats -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/geoip2/tests_sh_geoip2.py b/bin/tests/system/geoip2/tests_sh_geoip2.py index 7cac6a8af8..e0dc60bd01 100644 --- a/bin/tests/system/geoip2/tests_sh_geoip2.py +++ b/bin/tests/system/geoip2/tests_sh_geoip2.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.out.*", + "ns2/example*.db", + ] +) + def test_geoip2(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/glue/clean.sh b/bin/tests/system/glue/clean.sh deleted file mode 100644 index 92036f2bba..0000000000 --- a/bin/tests/system/glue/clean.sh +++ /dev/null @@ -1,25 +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. - -# -# Clean up after glue tests. -# - -rm -f */named.conf -rm -f */named.memstats -rm -f */named.run -rm -f ns*/K* -rm -f ns*/dsset-* -rm -f ns*/managed-keys.bind* -rm -f ns*/tc-test-signed.db -rm -f ns*/tc-test-signed.db.signed diff --git a/bin/tests/system/glue/tests_glue.py b/bin/tests/system/glue/tests_glue.py index 9d9a8e4a52..f346998dc0 100644 --- a/bin/tests/system/glue/tests_glue.py +++ b/bin/tests/system/glue/tests_glue.py @@ -9,14 +9,23 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. + import dns.message +import pytest import isctest -import pytest - pytest.importorskip("dns", minversion="2.0.0") +pytestmark = pytest.mark.extra_artifacts( + [ + "ns1/*", + "ns1/dsset-*", + "ns1/tc-test-signed.db", + "ns1/tc-test-signed.db.signed", + ] +) + def test_glue_full_glue_set(): """test that a ccTLD referral gets a full glue set from the root zone""" diff --git a/bin/tests/system/hooks/clean.sh b/bin/tests/system/hooks/clean.sh deleted file mode 100644 index 83463ebdd4..0000000000 --- a/bin/tests/system/hooks/clean.sh +++ /dev/null @@ -1,16 +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 */named.run -rm -f */named.conf -rm -f */named.memstats diff --git a/bin/tests/system/host/clean.sh b/bin/tests/system/host/clean.sh deleted file mode 100644 index 5cd0fa06d2..0000000000 --- a/bin/tests/system/host/clean.sh +++ /dev/null @@ -1,20 +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 ns1/example.db -rm -f host.out* -rm -f host.err* -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/host/setup.sh b/bin/tests/system/host/setup.sh index 754d4f36d4..15300ed932 100644 --- a/bin/tests/system/host/setup.sh +++ b/bin/tests/system/host/setup.sh @@ -15,8 +15,6 @@ set -e . ../conf.sh -$SHELL clean.sh - $SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 1 >ns1/example.db copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/host/tests_sh_host.py b/bin/tests/system/host/tests_sh_host.py index 56da3b1f21..b605160eab 100644 --- a/bin/tests/system/host/tests_sh_host.py +++ b/bin/tests/system/host/tests_sh_host.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "host.err*", + "host.out*", + "ns1/example.db", + ] +) + def test_host(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/idna/clean.sh b/bin/tests/system/idna/clean.sh deleted file mode 100644 index 2d6707cc26..0000000000 --- a/bin/tests/system/idna/clean.sh +++ /dev/null @@ -1,18 +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 */named.memstats -rm -f */named.run -rm -f */named.conf -rm -f dig.out.* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/idna/tests_sh_idna.py b/bin/tests/system/idna/tests_sh_idna.py index 82a640ceae..f4a9ed06f9 100644 --- a/bin/tests/system/idna/tests_sh_idna.py +++ b/bin/tests/system/idna/tests_sh_idna.py @@ -9,6 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + ] +) + def test_idna(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/include-multiplecfg/clean.sh b/bin/tests/system/include-multiplecfg/clean.sh deleted file mode 100644 index 6e1dbca888..0000000000 --- a/bin/tests/system/include-multiplecfg/clean.sh +++ /dev/null @@ -1,21 +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. - -# -# Clean up after allow query tests. -# - -rm -f ns*/named.conf -rm -f */named.memstats -rm -f ns*/named.run ns*/named.run.prev -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/inline/clean.sh b/bin/tests/system/inline/clean.sh deleted file mode 100644 index 5fb2e83aba..0000000000 --- a/bin/tests/system/inline/clean.sh +++ /dev/null @@ -1,27 +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 -rf ./*/*.jbk \ - ./*/*.nzd ./*/*.nzd-lock ./*/*.nzf \ - ./*/named.conf ./*/named.memstats ./*/named.run* \ - ./*/trusted.conf \ - ./K* ./*/K* \ - ./checkecdsa \ - ./freeze.test* thaw.test* \ - ./import.key \ - ././ns*/managed-keys.bind* ./ns*/*.mkeys* \ - ./*/dsset-* ./*/nzf-* \ - ./*/*.db ./*/*.db.signed ./*/*.db.jnl ./*/*.db.signed.jnl \ - ./*.out ./*.out* ./*/*.out ./*/*.out* \ - ./*/*.bk ./*/*.bk.jnl ./*/*.bk.signed ./*/*.bk.signed.jnl \ - ns3/a-file ns3/removedkeys ns3/delayedkeys.conf diff --git a/bin/tests/system/inline/tests_sh_inline.py b/bin/tests/system/inline/tests_sh_inline.py index f7520b8792..094e9607f2 100644 --- a/bin/tests/system/inline/tests_sh_inline.py +++ b/bin/tests/system/inline/tests_sh_inline.py @@ -9,6 +9,33 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "K*", + "*.out*", + "freeze.test*", + "import.key", + "journalprint.out.*", + "thaw.test*", + "*/*.out*", + "ns*/K*", + "ns*/dsset-*", + "ns*/*.db", + "ns*/*.nzd", + "ns*/*.nzf", + "ns*/K*", + "ns*/trusted.conf", + "ns*/*.bk", + "ns*/*.jbk", + "ns*/*.jnl", + "ns*/*.signed", + "ns3/delayedkeys.conf", + "ns3/removedkeys", + ] +) + def test_inline(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/inline/tests_signed_zone_files.py b/bin/tests/system/inline/tests_signed_zone_files.py index 596b756933..aefeb55a3b 100755 --- a/bin/tests/system/inline/tests_signed_zone_files.py +++ b/bin/tests/system/inline/tests_signed_zone_files.py @@ -12,6 +12,27 @@ import glob import struct +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "K*", + "*.out*", + "*/*.out*", + "ns*/K*", + "ns*/dsset-*", + "ns*/*.bk", + "ns*/*.db", + "ns*/*.jbk", + "ns*/*.jnl", + "ns*/*.nzd", + "ns*/*.signed", + "ns*/trusted.conf", + "ns3/delayedkeys.conf", + "ns3/removedkeys", + ] +) + class RawFormatHeader(dict): """ diff --git a/bin/tests/system/integrity/clean.sh b/bin/tests/system/integrity/clean.sh deleted file mode 100644 index 941fccf35a..0000000000 --- a/bin/tests/system/integrity/clean.sh +++ /dev/null @@ -1,18 +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 dig.out.test* -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/integrity/tests_sh_integrity.py b/bin/tests/system/integrity/tests_sh_integrity.py index 7316af3c14..f8ac3a55ae 100644 --- a/bin/tests/system/integrity/tests_sh_integrity.py +++ b/bin/tests/system/integrity/tests_sh_integrity.py @@ -9,6 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + ] +) + def test_integrity(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/ixfr/clean.sh b/bin/tests/system/ixfr/clean.sh deleted file mode 100644 index 714459352f..0000000000 --- a/bin/tests/system/ixfr/clean.sh +++ /dev/null @@ -1,25 +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 stats.* -rm -f ns1/*.db ns1/*.jnl -rm -f ns3/*.jnl ns3/mytest*.db ns3/subtest*.db -rm -f ns4/*.jnl ns4/*.db -rm -f ns5/*.jnl ns5/*.db -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run */named.run.prev -rm -f */ans.run -rm -f dig.out.test* dig.out1.test* dig.out2.test* dig.out3.test* -rm -f ns3/large.db -rm -f ns*/managed-keys.bind* ns*/*.mkeys diff --git a/bin/tests/system/ixfr/tests_sh_ixfr.py b/bin/tests/system/ixfr/tests_sh_ixfr.py index 2c7fc28792..171a0c6d2d 100644 --- a/bin/tests/system/ixfr/tests_sh_ixfr.py +++ b/bin/tests/system/ixfr/tests_sh_ixfr.py @@ -9,6 +9,26 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out*", + "stats.*", + "ans*/ans.run", + "ns*/*.jnl", + "ns1/named.run.prev*", + "ns1/myftp.db", + "ns3/large.db", + "ns3/mytest*.db", + "ns3/subtest*.db", + "ns4/mytest.db", + "ns4/subtest.db", + "ns5/mytest.db", + "ns5/subtest.db", + ] +) + def test_ixfr(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/journal/clean.sh b/bin/tests/system/journal/clean.sh deleted file mode 100644 index adab870685..0000000000 --- a/bin/tests/system/journal/clean.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. - -rm -f */*.db */*.jnl -rm -f */named.conf -rm -f */named.memstats -rm -f */named.run -rm -f dig.out* -rm -f journalprint.out.* -rm -f ns1/managed-keys.bind -rm -f ns2/managed-keys.bind -rm -f tmp.jnl diff --git a/bin/tests/system/journal/tests_sh_journal.py b/bin/tests/system/journal/tests_sh_journal.py index e492e12b52..3f506ef774 100644 --- a/bin/tests/system/journal/tests_sh_journal.py +++ b/bin/tests/system/journal/tests_sh_journal.py @@ -9,6 +9,20 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "journalprint.out.*", + "tmp.jnl", + "ns*/*.db", + "ns*/*.jnl", + "ns1/managed-keys.bind", + "ns2/managed-keys.bind", + ] +) + def test_journal(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/kasp/clean.sh b/bin/tests/system/kasp/clean.sh deleted file mode 100644 index 08acb23c1c..0000000000 --- a/bin/tests/system/kasp/clean.sh +++ /dev/null @@ -1,38 +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 - -rm -f ./keygen.* -rm -f ./K*.private ./K*.key ./K*.state ./K*.cmp -rm -rf ./keys/ -rm -f dig.out* rrsig.out.* keyevent.out.* verify.out.* zone.out.* -rm -f ns*/named.conf ns*/named.memstats ns*/named.run* -rm -f ns*/named-fips.conf -rm -f ns*/policies/*.conf -rm -f ns*/*.jnl ns*/*.jbk -rm -f ns*/K*.private ns*/K*.key ns*/K*.state -rm -f ns*/dsset-* ns*/*.db ns*/*.db.signed -rm -f ns*/keygen.out.* ns*/settime.out.* ns*/signer.out.* -rm -f ns*/managed-keys.bind -rm -f ns*/*.mkeys -rm -f ns*/zones ns*/*.db.infile -rm -f ns*/*.zsk1 ns*/*.zsk2 -rm -f ns3/legacy-keys.* -rm -rf ns3/keys/ -rm -f *.created published.test* retired.test* -rm -f rndc.dnssec.*.out.* rndc.zonestatus.out.* -rm -f python.out.* -rm -f created.key-* unused.key-* -rm -f ns3/ksk/K* ns3/zsk/K* -rm -rf ./ns3/ksk/ ./ns3/zsk/ diff --git a/bin/tests/system/kasp/tests_sh_kasp.py b/bin/tests/system/kasp/tests_sh_kasp.py index d01125d0c1..64b9eac2fd 100644 --- a/bin/tests/system/kasp/tests_sh_kasp.py +++ b/bin/tests/system/kasp/tests_sh_kasp.py @@ -9,6 +9,57 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "K*.private", + "K*.key", + "K*.state", + "K*.cmp", + "*.created", + "dig.out*", + "keyevent.out.*", + "keygen.out.*", + "keys", + "published.test*", + "python.out.*", + "retired.test*", + "rndc.dnssec.*.out.*", + "rndc.zonestatus.out.*", + "rrsig.out.*", + "created.key-*", + "unused.key-*", + "verify.out.*", + "zone.out.*", + "ns*/K*.private", + "ns*/K*.key", + "ns*/K*.state", + "ns*/*.db", + "ns*/*.db.infile", + "ns*/*.db.signed", + "ns*/*.jbk", + "ns*/*.jnl", + "ns*/dsset-*", + "ns*/keygen.out.*", + "ns*/keys", + "ns*/ksk", + "ns*/ksk/K*", + "ns*/zsk", + "ns*/zsk", + "ns*/zsk/K*", + "ns*/named-fips.conf", + "ns*/settime.out.*", + "ns*/signer.out.*", + "ns*/zones", + "ns*/policies/*.conf", + "ns*/*.zsk1", + "ns*/*.zsk2", + "ns3/legacy-keys.*", + "ns3/dynamic-signed-inline-signing.kasp.db.signed.signed", + ] +) + def test_kasp(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/keepalive/clean.sh b/bin/tests/system/keepalive/clean.sh deleted file mode 100644 index b891173a72..0000000000 --- a/bin/tests/system/keepalive/clean.sh +++ /dev/null @@ -1,20 +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 dig.out.* -rm -f output -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/named.conf -rm -f ns*/named.stats -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/keepalive/tests_sh_keepalive.py b/bin/tests/system/keepalive/tests_sh_keepalive.py index a2433c4029..892e761b92 100644 --- a/bin/tests/system/keepalive/tests_sh_keepalive.py +++ b/bin/tests/system/keepalive/tests_sh_keepalive.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "output", + "ns2/named.stats", + ] +) + def test_keepalive(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/keyfromlabel/clean.sh b/bin/tests/system/keyfromlabel/clean.sh deleted file mode 100644 index 1a5adb1d95..0000000000 --- a/bin/tests/system/keyfromlabel/clean.sh +++ /dev/null @@ -1,27 +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. - -# shellcheck source=conf.sh -. ../conf.sh - -set -e - -rm -f K* -rm -f pin -rm -f dsset-* -rm -f *.example.db *.example.db.signed -rm -f keyfromlabel.out.* -rm -f pkcs11-tool.out.* -rm -f signer.out.* - -OPENSSL_CONF= softhsm2-util --delete-token --token "softhsm2-keyfromlabel" >/dev/null 2>&1 || echo_i "softhsm2-keyfromlabel token not found for cleaning" diff --git a/bin/tests/system/keyfromlabel/tests_sh_keyfromlabel.py b/bin/tests/system/keyfromlabel/tests_sh_keyfromlabel.py index 9cbf56e125..93e7154fa5 100644 --- a/bin/tests/system/keyfromlabel/tests_sh_keyfromlabel.py +++ b/bin/tests/system/keyfromlabel/tests_sh_keyfromlabel.py @@ -9,6 +9,21 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "*.example.db", + "*.example.db.signed", + "K*", + "dsset-*", + "keyfromlabel.out.*", + "pin", + "pkcs11-tool.out.*", + "signer.out.*", + ] +) + def test_keyfromlabel(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/ksr/tests_ksr.py b/bin/tests/system/ksr/tests_ksr.py index 8fcdbdb7d8..d2b3e86c17 100644 --- a/bin/tests/system/ksr/tests_ksr.py +++ b/bin/tests/system/ksr/tests_ksr.py @@ -16,12 +16,71 @@ import shutil import time from typing import List, Optional +import pytest + import isctest from isctest.kasp import ( Key, KeyTimingMetadata, ) +pytestmark = pytest.mark.extra_artifacts( + [ + "K*", + "common.test.*", + "future.test.*", + "in-the-middle.test.*", + "ksk-roll.test.*", + "last-bundle.test.*", + "past.test.*", + "two-tone.test.*", + "unlimited.test.*", + "ns1/K*", + "ns1/_default.nzd", + "ns1/_default.nzf", + "ns1/common.test.db", + "ns1/common.test.db.jbk", + "ns1/common.test.db.signed", + "ns1/common.test.db.signed.jnl", + "ns1/common.test.skr.2", + "ns1/future.test.db", + "ns1/future.test.db.jbk", + "ns1/future.test.db.signed", + "ns1/future.test.skr.1", + "ns1/in-the-middle.test.db", + "ns1/in-the-middle.test.db.jbk", + "ns1/in-the-middle.test.db.signed", + "ns1/in-the-middle.test.db.signed.jnl", + "ns1/in-the-middle.test.skr.1", + "ns1/keydir", + "ns1/ksk-roll.test.db", + "ns1/ksk-roll.test.db.jbk", + "ns1/ksk-roll.test.db.signed", + "ns1/ksk-roll.test.db.signed.jnl", + "ns1/ksk-roll.test.skr.1", + "ns1/last-bundle.test.db", + "ns1/last-bundle.test.db.jbk", + "ns1/last-bundle.test.db.signed", + "ns1/last-bundle.test.db.signed.jnl", + "ns1/last-bundle.test.skr.1", + "ns1/offline", + "ns1/past.test.db", + "ns1/past.test.db.jbk", + "ns1/past.test.db.signed", + "ns1/past.test.skr.1", + "ns1/two-tone.test.db", + "ns1/two-tone.test.db.jbk", + "ns1/two-tone.test.db.signed", + "ns1/two-tone.test.db.signed.jnl", + "ns1/two-tone.test.skr.1", + "ns1/unlimited.test.db", + "ns1/unlimited.test.db.jbk", + "ns1/unlimited.test.db.signed", + "ns1/unlimited.test.db.signed.jnl", + "ns1/unlimited.test.unlimited.skr.1", + ] +) + def between(value, start, end): if value is None or start is None or end is None: diff --git a/bin/tests/system/legacy/clean.sh b/bin/tests/system/legacy/clean.sh deleted file mode 100644 index b26c0d9b96..0000000000 --- a/bin/tests/system/legacy/clean.sh +++ /dev/null @@ -1,30 +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 dig.out.* -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run - -# build.sh -rm -f ns1/named_dump.db* -rm -f ns6/K* -rm -f ns6/dsset-* -rm -f ns6/edns512.db -rm -f ns6/signer.err -rm -f ns7/K* -rm -f ns7/dsset-* -rm -f ns7/edns512-notcp.db -rm -f ns7/signer.err -rm -f ns7/trusted.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/legacy/tests_sh_legacy.py b/bin/tests/system/legacy/tests_sh_legacy.py index ded36f049b..7d83b066f9 100644 --- a/bin/tests/system/legacy/tests_sh_legacy.py +++ b/bin/tests/system/legacy/tests_sh_legacy.py @@ -9,6 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + ] +) + def test_legacy(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/limits/clean.sh b/bin/tests/system/limits/clean.sh deleted file mode 100644 index 635a0e1e3f..0000000000 --- a/bin/tests/system/limits/clean.sh +++ /dev/null @@ -1,20 +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. - -# -# Clean up after limits tests. -# -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/logfileconfig/clean.sh b/bin/tests/system/logfileconfig/clean.sh deleted file mode 100644 index f87a3e893d..0000000000 --- a/bin/tests/system/logfileconfig/clean.sh +++ /dev/null @@ -1,37 +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. - -# -# Clean up after log file tests -# -rm -f ns1/named.conf -rm -f ns1/named.args -rm -f ns1/named.pid ns1/named.run ns1/named.run.prev -rm -f ns1/named.memstats ns1/dig.out -rm -f ns1/named_log ns1/named_pipe ns1/named_sym -rm -rf ns1/named_dir -rm -f ns1/named_deflog -rm -f ns1/query_log -rm -f ns1/named_iso8601 -rm -f ns1/named_iso8601_utc -rm -f ns1/rndc.out.test* -rm -f ns1/dig.out.test* -rm -f ns1/named_vers -rm -f ns1/named_vers.* -rm -f ns1/named_ts -rm -f ns1/named_ts.* -rm -f ns1/named_inc -rm -f ns1/named_inc.* -rm -f ns1/named_unlimited -rm -f ns1/named_unlimited.* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/logfileconfig/tests_sh_logfileconfig.py b/bin/tests/system/logfileconfig/tests_sh_logfileconfig.py index 655a8eeb5a..dde400b7b9 100644 --- a/bin/tests/system/logfileconfig/tests_sh_logfileconfig.py +++ b/bin/tests/system/logfileconfig/tests_sh_logfileconfig.py @@ -9,6 +9,27 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.out.*", + "ns1/named.args", + "ns1/named_deflog", + "ns1/named_inc*", + "ns1/named_iso8601", + "ns1/named_iso8601_utc", + "ns1/named_log", + "ns1/named_pipe", + "ns1/named_sym", + "ns1/named_ts*", + "ns1/named_unlimited*", + "ns1/named_vers*", + "ns1/query_log*", + ] +) + def test_logfileconfig(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/masterfile/clean.sh b/bin/tests/system/masterfile/clean.sh deleted file mode 100644 index 8883a9487d..0000000000 --- a/bin/tests/system/masterfile/clean.sh +++ /dev/null @@ -1,17 +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 */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/masterformat/clean.sh b/bin/tests/system/masterformat/clean.sh deleted file mode 100755 index c96ad2611e..0000000000 --- a/bin/tests/system/masterformat/clean.sh +++ /dev/null @@ -1,37 +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 ./ns1/example.db.raw* -rm -f ./ns1/example.db.compat -rm -f ./ns1/example.db.serial.raw -rm -f ./ns1/large.db ./ns1/large.db.raw -rm -f ./ns1/signed.db.raw -rm -f ./ns1/session.key -rm -f ./ns1/signed.db.raw.jbk -rm -f ./ns1/signed.db.raw.signed -rm -f ./ns1/signed.db.raw.signed.jnl -rm -f ./dig.out.* -rm -f ./dig.out -rm -f ./*/named.memstats -rm -f ./*/named.conf -rm -f ./*/named.run -rm -f ./ns2/example.db -rm -f ./ns2/transfer.db.* -rm -f ./ns2/formerly-text.db -rm -f ./ns2/db-* -rm -f ./ns2/large.bk -rm -f ./ns3/example.db.raw ./ns3/dynamic.db.raw -rm -f ./baseline.txt ./text.* ./raw.* -rm -f ./ns1/Ksigned.* ./ns1/dsset-signed. ./ns1/signed.db.signed -rm -f ./rndc.out -rm -f ./ns*/managed-keys.bind* diff --git a/bin/tests/system/masterformat/tests_sh_masterformat.py b/bin/tests/system/masterformat/tests_sh_masterformat.py index b70f036d08..9bd5a815bc 100644 --- a/bin/tests/system/masterformat/tests_sh_masterformat.py +++ b/bin/tests/system/masterformat/tests_sh_masterformat.py @@ -9,6 +9,38 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "baseline.txt", + "dig.out.*", + "raw.*", + "rndc.out*", + "text.*", + "ns*/*.raw*", + "ns*/*.jbk", + "ns*/*.jnl", + "ns*/*.signed", + "ns*/dsset-*", + "ns*/K*", + "ns1/255types.db", + "ns1/example.db.compat", + "ns1/on-limit-kasp.db", + "ns1/on-limit.db", + "ns1/over-limit.db", + "ns1/under-limit-kasp.db", + "ns1/under-limit.db", + "ns2/db-*", + "ns2/example.db", + "ns2/formerly-text.db", + "ns2/transfer.db.full", + "ns2/transfer.db.txt", + "ns2/under-limit-kasp.bk", + "ns2/under-limit.bk", + ] +) + def test_masterformat(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/metadata/clean.sh b/bin/tests/system/metadata/clean.sh deleted file mode 100644 index f70aa0856e..0000000000 --- a/bin/tests/system/metadata/clean.sh +++ /dev/null @@ -1,20 +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 K* dsset-* *.signed *.new -rm -f zsk.key ksk.key parent.ksk.key parent.zsk.key -rm -f pending.key rolling.key standby.key inact.key -rm -f prerev.key postrev.key oldstyle.key -rm -f keys sigs -rm -f tmp.out -rm -f settime1.test* settime2.test* diff --git a/bin/tests/system/metadata/tests_sh_metadata.py b/bin/tests/system/metadata/tests_sh_metadata.py index 484328868e..accfae2265 100644 --- a/bin/tests/system/metadata/tests_sh_metadata.py +++ b/bin/tests/system/metadata/tests_sh_metadata.py @@ -9,6 +9,32 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "*.new", + "*.signed", + "K*", + "dsset-*", + "inact.key", + "keys", + "ksk.key", + "oldstyle.key", + "parent.ksk.key", + "parent.zsk.key", + "pending.key", + "postrev.key", + "prerev.key", + "rolling.key", + "settime*.test*", + "sigs", + "standby.key", + "tmp.out", + "zsk.key", + ] +) + def test_metadata(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/mirror/clean.sh b/bin/tests/system/mirror/clean.sh deleted file mode 100644 index 2e0218351b..0000000000 --- a/bin/tests/system/mirror/clean.sh +++ /dev/null @@ -1,30 +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 */*.conf -rm -f */*.db -rm -f */*.jnl -rm -f */*.mirror -rm -f */*.nzd* -rm -f */*.prev -rm -f */*.signed -rm -f */K* -rm -f */db-* -rm -f */dsset-* -rm -f */jn-* -rm -f */_default.nzf -rm -f */managed-keys.bind* -rm -f */named.memstats -rm -f */named.run -rm -f dig.out.* -rm -f rndc.out.* diff --git a/bin/tests/system/mirror/tests_sh_mirror.py b/bin/tests/system/mirror/tests_sh_mirror.py index f8d6b9d247..5aefe671be 100644 --- a/bin/tests/system/mirror/tests_sh_mirror.py +++ b/bin/tests/system/mirror/tests_sh_mirror.py @@ -9,6 +9,26 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.out.*", + "ns*/db-*", + "ns*/dsset-*", + "ns*/jn-*", + "ns*/K*", + "ns*/*.conf", + "ns*/*.db", + "ns*/*.jnl", + "ns*/*.mirror", + "ns*/*.nzf*", + "ns*/*.nzd*", + "ns*/*.signed", + ] +) + def test_mirror(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/mkeys/clean.sh b/bin/tests/system/mkeys/clean.sh deleted file mode 100644 index efaefb14ff..0000000000 --- a/bin/tests/system/mkeys/clean.sh +++ /dev/null @@ -1,33 +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 */K* */*.signed */trusted.conf */*.jnl */*.bk -rm -f */island.conf -rm -f */private.conf -rm -f */managed*.conf ns1/managed.key ns1/managed.key.id -rm -f */managed-keys.bind* */named.secroots -rm -f */named.conf -rm -f */named.memstats */named.run */named.run.prev -rm -f dig.out* delv.out* rndc.out* signer.out* -rm -f dsset-. ns1/dsset-. -rm -f ns*/managed-keys.bind* -rm -f ns1/dsset-sub.tld. -rm -f ns1/dsset-tld. -rm -f ns1/named.secroots ns1/root.db.signed* ns1/root.db.tmp -rm -f ns1/signer.out.* -rm -f ns1/zone.key -rm -f ns3/broken.conf -rm -f ns4/dsset-sub.foo. -rm -f ns5/named.args -rm -f ns7/view1.mkeys ns7/view2.mkeys -rm -rf ns4/nope diff --git a/bin/tests/system/mkeys/tests_sh_mkeys.py b/bin/tests/system/mkeys/tests_sh_mkeys.py index 48d79acf28..b04d788476 100644 --- a/bin/tests/system/mkeys/tests_sh_mkeys.py +++ b/bin/tests/system/mkeys/tests_sh_mkeys.py @@ -11,7 +11,42 @@ import pytest -pytestmark = pytest.mark.algorithm_set("ecc_default") +pytestmark = [ + pytest.mark.algorithm_set("ecc_default"), + pytest.mark.extra_artifacts( + [ + "delv.*", + "dig.out.*", + "dsset-*", + "rndc.out.*", + "signer.out.*", + "ns*/dsset-*", + "ns*/*.bk", + "ns*/*.jnl", + "ns*/K*", + "ns*/island.conf", + "ns*/managed.conf", + "ns*/named.secroots", + "ns*/private.conf", + "ns*/signer.out.*", + "ns*/trusted.conf", + "ns*/*.signed", + "ns1/managed.key", + "ns1/managed.key.id", + "ns1/root.db.orig", + "ns1/root.db.tmp", + "ns1/zone.key", + "ns2/managed-keys.bind", + "ns3/broken.conf", + "ns3/managed-keys.bind", + "ns4/nope", + "ns5/managed-keys.bind", + "ns5/named.args", + "ns7/view1.mkeys", + "ns7/view2.mkeys", + ] + ), +] def test_mkeys(run_tests_sh): diff --git a/bin/tests/system/multisigner/clean.sh b/bin/tests/system/multisigner/clean.sh deleted file mode 100644 index 393efbbf37..0000000000 --- a/bin/tests/system/multisigner/clean.sh +++ /dev/null @@ -1,43 +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 - -rm -f *.created -rm -f cdnskey.ns* -rm -f cds.ns* -rm -f secondary.cdnskey.ns* -rm -f secondary.cds.ns* -rm -f created.key-* -rm -f dig.out.* -rm -f python.out.* -rm -f rndc.dnssec.status.out.* -rm -f unused.key-* -rm -f verify.out.* - -rm -f ns*/*.jbk -rm -f ns*/*.jnl -rm -f ns*/*.journal.out.test* -rm -f ns*/*.signed -rm -f ns*/*.signed.jnl -rm -f ns*/*.zsk -rm -f ns*/db-* -rm -f ns*/K* -rm -f ns*/keygen.out.* -rm -f ns*/managed-keys* -rm -f ns*/model2.secondary.db -rm -f ns*/model2.secondary.db -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/settime.out.* diff --git a/bin/tests/system/multisigner/setup.sh b/bin/tests/system/multisigner/setup.sh index d1020f3fcc..06066bc843 100644 --- a/bin/tests/system/multisigner/setup.sh +++ b/bin/tests/system/multisigner/setup.sh @@ -16,8 +16,6 @@ set -e -$SHELL clean.sh - copy_setports ns3/named.conf.in ns3/named.conf copy_setports ns4/named.conf.in ns4/named.conf copy_setports ns5/named.conf.in ns5/named.conf diff --git a/bin/tests/system/multisigner/tests_sh_multisigner.py b/bin/tests/system/multisigner/tests_sh_multisigner.py index 1419270b17..61d6c5daa4 100644 --- a/bin/tests/system/multisigner/tests_sh_multisigner.py +++ b/bin/tests/system/multisigner/tests_sh_multisigner.py @@ -9,6 +9,31 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "*.created", + "cdnskey.ns*", + "cds.ns*", + "dig.out.*", + "rndc.dnssec.status.out.*", + "secondary.cdnskey.ns*", + "secondary.cds.ns*", + "verify.out.*", + "ns*/K*", + "ns*/db-*", + "ns*/keygen.out.*", + "ns*/*.jbk", + "ns*/*.jnl", + "ns*/*.zsk", + "ns*/*.signed", + "ns*/*.journal.out.*", + "ns*/settime.out.*", + "ns*/model2.secondary.db", + ] +) + def test_multisigner(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/names/clean.sh b/bin/tests/system/names/clean.sh deleted file mode 100644 index 8864732ef5..0000000000 --- a/bin/tests/system/names/clean.sh +++ /dev/null @@ -1,19 +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 dig.*.test* -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/named.pid -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/names/tests_sh_names.py b/bin/tests/system/names/tests_sh_names.py index ebeed2ff56..25e188e697 100644 --- a/bin/tests/system/names/tests_sh_names.py +++ b/bin/tests/system/names/tests_sh_names.py @@ -9,6 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.*.test*", + ] +) + def test_names(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/notify/clean.sh b/bin/tests/system/notify/clean.sh deleted file mode 100644 index fe2156be93..0000000000 --- a/bin/tests/system/notify/clean.sh +++ /dev/null @@ -1,38 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.port -rm -f ./*/named.run ./*/named.run.prev -rm -f awk.out.ns?.test* -rm -f dig.out.?.ns5.test* -rm -f dig.out.ns2.test* -rm -f dig.out.ns3.test* -rm -f dig.out.ns4.test* -rm -f log.out -rm -f ns*/managed-keys.bind* ns*/*.mkeys* -rm -f ns2/example.db -rm -f ns2/x21.db* -rm -f ns3/example.bk -rm -f ns4/x21.bk* -rm -f ns5/x21.bk-b -rm -f ns5/x21.bk-b.jnl -rm -f ns5/x21.bk-c -rm -f ns5/x21.bk-c.jnl -rm -f ns5/x21.db.jnl -rm -f tmp diff --git a/bin/tests/system/notify/tests_sh_notify.py b/bin/tests/system/notify/tests_sh_notify.py index 105b2d8238..ff8e9df2c7 100644 --- a/bin/tests/system/notify/tests_sh_notify.py +++ b/bin/tests/system/notify/tests_sh_notify.py @@ -9,6 +9,30 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "awk.out.*", + "dig.out.*", + "ns2/example.db", + "ns2/named-tls.conf", + "ns2/options-tls.conf", + "ns2/x21.db*", + "ns3/example.bk", + "ns3/named-tls.conf", + "ns3/options-tls.conf", + "ns4/named.port", + "ns4/x21.bk", + "ns4/x21.bk.jnl", + "ns5/x21.bk-b", + "ns5/x21.bk-b.jnl", + "ns5/x21.bk-c", + "ns5/x21.bk-c.jnl", + "ns5/x21.db.jnl", + ] +) + def test_notify(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/nsec3/clean.sh b/bin/tests/system/nsec3/clean.sh deleted file mode 100644 index 8714dfe4b5..0000000000 --- a/bin/tests/system/nsec3/clean.sh +++ /dev/null @@ -1,23 +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 - -rm -f created.key-* *.created unused.key-* -rm -f dig.out.* rndc.reload.* rndc.signing.* update.out.* verify.out.* -rm -f ns*/*.jnl ns*/*.jbk ns*/managed-keys.bind -rm -f ns*/K*.private ns*/K*.key ns*/K*.state -rm -f ns*/dsset-* ns*/*.db ns*/*.db.signed -rm -f ns*/keygen.out.* ns*/settime.out.* -rm -f ns*/named.conf ns*/named.memstats ns*/named.run* -rm -f ns3/named-fips.conf diff --git a/bin/tests/system/nsec3/tests_sh_nsec3.py b/bin/tests/system/nsec3/tests_sh_nsec3.py index 16df54112d..90476f2518 100644 --- a/bin/tests/system/nsec3/tests_sh_nsec3.py +++ b/bin/tests/system/nsec3/tests_sh_nsec3.py @@ -9,6 +9,28 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "*.created", + "dig.out.*", + "rndc.reload.*", + "rndc.signing.*", + "update.out.*", + "verify.out.*", + "ns*/dsset-**", + "ns*/K*", + "ns*/settime.out.*", + "ns*/*.db", + "ns*/*.jbk", + "ns*/*.jnl", + "ns*/*.signed", + "ns*/keygen.out.*", + "ns3/named-fips.conf", + ] +) + def test_nsec3(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/nslookup/clean.sh b/bin/tests/system/nslookup/clean.sh deleted file mode 100644 index 1cace4d6b1..0000000000 --- a/bin/tests/system/nslookup/clean.sh +++ /dev/null @@ -1,20 +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 ns1/example.db -rm -f nslookup.out* -rm -f nslookup.err* -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/nslookup/tests_sh_nslookup.py b/bin/tests/system/nslookup/tests_sh_nslookup.py index 9553a82aee..0b7584498c 100644 --- a/bin/tests/system/nslookup/tests_sh_nslookup.py +++ b/bin/tests/system/nslookup/tests_sh_nslookup.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "nslookup.err*", + "nslookup.out*", + "ns1/example.db", + ] +) + def test_nslookup(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/nsupdate/clean.sh b/bin/tests/system/nsupdate/clean.sh deleted file mode 100644 index de5f3c3be9..0000000000 --- a/bin/tests/system/nsupdate/clean.sh +++ /dev/null @@ -1,75 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f */*.jnl -rm -f */named.conf -rm -f */named.memstats -rm -f */named.run */ans.run -rm -f */named.run.prev -rm -f Kxxx.* -rm -f check.out.* -rm -f dig.out.* -rm -f jp.out.ns3.* -rm -f keygen.out.* -rm -f nextpart.out.* -rm -f ns*/managed-keys.bind* ns*/*.mkeys* -rm -f ns1/example.db ns1/unixtime.db ns1/yyyymmddvv.db ns1/update.db ns1/other.db ns1/keytests.db -rm -f ns1/many.test.db -rm -f ns1/maxjournal.db -rm -f ns1/md5.key ns1/sha1.key ns1/sha224.key ns1/sha256.key ns1/sha384.key -rm -f ns1/legacy157.key ns1/legacy161.key ns1/legacy162.key ns1/legacy163.key ns1/legacy164.key ns1/legacy165.key -rm -f ns1/sample.db -rm -f ns1/tls.conf -rm -f ns1/tls.options -rm -f ns1/sha512.key ns1/ddns.key -rm -f ns10/_default.tsigkeys -rm -f ns10/example.com.db -rm -f ns10/in-addr.db -rm -f ns2/example.bk -rm -f ns2/sample.db -rm -f ns2/update.bk ns2/update.alt.bk -rm -f ns3/*.signed -rm -f ns3/K* -rm -f ns3/delegation.test.db -rm -f ns3/dnskey.test.db -rm -f ns3/dsset-* -rm -f ns3/example.db -rm -f ns3/relaxed.db -rm -f ns3/multisigner.test.db -rm -f ns3/many.test.bk -rm -f ns3/nsec3param.test.db -rm -f ns3/too-big.test.db -rm -f ns5/local.db -rm -f ns6/2.0.0.2.ip6.addr.db -rm -f ns6/in-addr.db -rm -f ns7/_default.tsigkeys -rm -f ns7/example.com.db -rm -f ns7/in-addr.db -rm -f ns8/_default.tsigkeys -rm -f ns8/example.com.db -rm -f ns8/in-addr.db -rm -f ns9/_default.tsigkeys -rm -f ns9/denyname.example.db -rm -f ns9/example.com.db -rm -f ns9/in-addr.db -rm -f perl.update_test.out -rm -f nsupdate.alg-* -rm -f nsupdate.out* -rm -f typelist.out.* -rm -f update.out.* -rm -f update.in.* -rm -f verylarge diff --git a/bin/tests/system/nsupdate/tests_sh_nsupdate.py b/bin/tests/system/nsupdate/tests_sh_nsupdate.py index 305f1a191f..20d8fc9b6d 100644 --- a/bin/tests/system/nsupdate/tests_sh_nsupdate.py +++ b/bin/tests/system/nsupdate/tests_sh_nsupdate.py @@ -11,8 +11,71 @@ import platform +import pytest + import isctest.mark +pytestmark = pytest.mark.extra_artifacts( + [ + "Kxxx*", + "dig.out.*", + "nextpart.out.*", + "nsupdate.*out*", + "perl.update_test.out", + "typelist.out.*", + "update.in.*", + "verylarge", + "ans*/ans.run", + "ns*/*.jnl", + "ns*/*.jnl", + "ns1/ddns.key", + "ns1/example.db", + "ns1/keytests.db", + "ns1/legacy*.key", + "ns1/many.test.db", + "ns1/maxjournal.db", + "ns1/md5.key", + "ns1/other.db", + "ns1/sample.db", + "ns1/sha*.key", + "ns1/tls.conf", + "ns1/tls.options", + "ns1/unixtime.db", + "ns1/update.db", + "ns1/yyyymmddvv.db", + "ns2/example.bk", + "ns2/sample.db", + "ns2/update.alt.bk", + "ns2/update.bk", + "ns3/dsset-*", + "ns3/K*", + "ns3/*.signed", + "ns3/delegation.test.db", + "ns3/dnskey.test.db", + "ns3/example.db", + "ns3/multisigner.test.db", + "ns3/nsec3param.test.db", + "ns3/relaxed.db", + "ns3/too-big.test.db", + "ns5/local.db", + "ns6/2.0.0.2.ip6.addr.db", + "ns6/in-addr.db", + "ns7/_default.tsigkeys", + "ns7/example.com.db", + "ns7/in-addr.db", + "ns8/_default.tsigkeys", + "ns8/example.com.db", + "ns8/in-addr.db", + "ns9/_default.tsigkeys", + "ns9/denyname.example.db", + "ns9/example.com.db", + "ns9/in-addr.db", + "ns10/_default.tsigkeys", + "ns10/example.com.db", + "ns10/in-addr.db", + ] +) + MAX_RUNS = 2 if platform.system() == "FreeBSD" else 1 # GL#3846 diff --git a/bin/tests/system/nzd2nzf/clean.sh b/bin/tests/system/nzd2nzf/clean.sh deleted file mode 100644 index 9b826ca0fa..0000000000 --- a/bin/tests/system/nzd2nzf/clean.sh +++ /dev/null @@ -1,21 +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 ./*/named.conf -rm -f ./*/named.run -rm -f ./*/named.memstats -rm -f dig.out.* -rm -f rndc.out* -rm -f ns*/*.nzf -rm -f ns*/*.nzd ns*/*.nzd-lock -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/nzd2nzf/tests_sh_nzd2nzf.py b/bin/tests/system/nzd2nzf/tests_sh_nzd2nzf.py index b0304516d0..a42addd380 100644 --- a/bin/tests/system/nzd2nzf/tests_sh_nzd2nzf.py +++ b/bin/tests/system/nzd2nzf/tests_sh_nzd2nzf.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns*/*.nzd", + "ns*/*.nzf*", + ] +) + def test_nzd2nzf(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/padding/clean.sh b/bin/tests/system/padding/clean.sh deleted file mode 100644 index 190863ae99..0000000000 --- a/bin/tests/system/padding/clean.sh +++ /dev/null @@ -1,20 +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 dig.out.* -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/named.stats -rm -f ns*/named.stats.prev -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/padding/tests_sh_padding.py b/bin/tests/system/padding/tests_sh_padding.py index a2eec7cd60..1d23191dff 100644 --- a/bin/tests/system/padding/tests_sh_padding.py +++ b/bin/tests/system/padding/tests_sh_padding.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns2/named.stats*", + ] +) + def test_padding(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/pending/clean.sh b/bin/tests/system/pending/clean.sh deleted file mode 100644 index a75013fc88..0000000000 --- a/bin/tests/system/pending/clean.sh +++ /dev/null @@ -1,26 +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 -rf */*.signed -rm -rf */*.jnl -rm -rf */K* -rm -rf */dsset-* -rm -rf */named.memstats -rm -rf */named.run -rm -rf */trusted.conf -rm -rf ns1/root.db -rm -rf ns2/example.db -rm -rf ns2/example.com.db -rm -rf nsupdate.out.test -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/pending/tests_sh_pending.py b/bin/tests/system/pending/tests_sh_pending.py index 54b5afb271..9f901944c1 100644 --- a/bin/tests/system/pending/tests_sh_pending.py +++ b/bin/tests/system/pending/tests_sh_pending.py @@ -9,6 +9,23 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "nsupdate.out.*", + "ns*/dsset-*", + "ns*/K*", + "ns*/*.jnl", + "ns*/*.signed", + "ns*/trusted.conf", + "ns*/K*", + "ns1/root.db", + "ns2/example.com.db", + "ns2/example.db", + ] +) + def test_pending(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/pipelined/clean.sh b/bin/tests/system/pipelined/clean.sh deleted file mode 100644 index 31983f58c9..0000000000 --- a/bin/tests/system/pipelined/clean.sh +++ /dev/null @@ -1,18 +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 ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run* -rm -f raw* output* ./*.out.* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/pipelined/tests_sh_pipelined.py b/bin/tests/system/pipelined/tests_sh_pipelined.py index 2d7fb928ee..7efe483da4 100644 --- a/bin/tests/system/pipelined/tests_sh_pipelined.py +++ b/bin/tests/system/pipelined/tests_sh_pipelined.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "output*", + "raw*", + "ans*/ans.run", + ] +) + def test_pipelined(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/proxy/clean.sh b/bin/tests/system/proxy/clean.sh deleted file mode 100644 index e8d1b95ee5..0000000000 --- a/bin/tests/system/proxy/clean.sh +++ /dev/null @@ -1,24 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run -rm -f ./*/named.run.prev -rm -f ./dig.out.* -rm -f ./*/example.db -rm -rf ./headers.* diff --git a/bin/tests/system/proxy/tests_sh_proxy.py b/bin/tests/system/proxy/tests_sh_proxy.py index 87e1a99b52..98239f282d 100644 --- a/bin/tests/system/proxy/tests_sh_proxy.py +++ b/bin/tests/system/proxy/tests_sh_proxy.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns*/example.db", + ] +) + def test_proxy(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/qmin/clean.sh b/bin/tests/system/qmin/clean.sh deleted file mode 100644 index 5d7d603723..0000000000 --- a/bin/tests/system/qmin/clean.sh +++ /dev/null @@ -1,20 +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 */named.memstats -rm -f */named.run */named.run.prev -rm -f ans*/query.log* -rm -f dig.out.* -rm -f named.run.* -rm -f ns*/named.conf -rm -f query*.log diff --git a/bin/tests/system/qmin/tests_sh_qmin.py b/bin/tests/system/qmin/tests_sh_qmin.py index 0faeebd0e9..2d9f90b4db 100644 --- a/bin/tests/system/qmin/tests_sh_qmin.py +++ b/bin/tests/system/qmin/tests_sh_qmin.py @@ -9,8 +9,20 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + import isctest.mark +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "named.run.*", + "query*.log", + "ans*/ans.run", + "ans*/query.log*", + ] +) + # The qmin test is inherently unstable, see GL #904 for details. @isctest.mark.flaky(max_runs=3) diff --git a/bin/tests/system/reclimit/clean.sh b/bin/tests/system/reclimit/clean.sh deleted file mode 100644 index 8922aa624c..0000000000 --- a/bin/tests/system/reclimit/clean.sh +++ /dev/null @@ -1,23 +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 dig.out* -rm -f ans?/ans.run -rm -f ans2/ans.limit -rm -f ans4/ans.limit -rm -f ns?/named.memstats -rm -f ns?/named.run -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* -rm -f ns*/signed.db* -rm -f ns*/*.db.signed diff --git a/bin/tests/system/reclimit/tests_sh_reclimit.py b/bin/tests/system/reclimit/tests_sh_reclimit.py index 447c9488e0..6a0ab31556 100644 --- a/bin/tests/system/reclimit/tests_sh_reclimit.py +++ b/bin/tests/system/reclimit/tests_sh_reclimit.py @@ -9,8 +9,22 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + import isctest.mark +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "dsset-signed.", + "ans*/ans.limit", + "ans*/ans.run", + "ns1/K*", + "ns1/signed.db", + "ns1/signed.db.signed", + ] +) + # The reclimit is known to be quite unstable. GL #1587 @isctest.mark.flaky(max_runs=2) diff --git a/bin/tests/system/redirect/clean.sh b/bin/tests/system/redirect/clean.sh deleted file mode 100644 index d8c120705a..0000000000 --- a/bin/tests/system/redirect/clean.sh +++ /dev/null @@ -1,37 +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 */named.conf -rm -f */named.memstats -rm -f */named.run -rm -f */named.stats -rm -f dig.out.* -rm -f ns1/K* -rm -f ns1/dsset-nsec3. -rm -f ns1/dsset-signed. -rm -f ns1/nsec3.db* -rm -f ns1/signed.db* -rm -f ns2/*.db -rm -f ns3/K* -rm -f ns3/dsset-nsec3. -rm -f ns3/dsset-signed. -rm -f ns3/nsec3.db* -rm -f ns3/signed.db* -rm -f ns4/*.db -rm -f ns5/dsset-* -rm -f ns5/K* ns5/sign.ns5.* -rm -f ns5/root.db ns5/root.db.signed -rm -f ns5/signed.db ns5/signed.db.signed -rm -f ns6/signed.db.signed -rm -f rndc.out -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/redirect/tests_sh_redirect.py b/bin/tests/system/redirect/tests_sh_redirect.py index 9009391236..5f20aad6f2 100644 --- a/bin/tests/system/redirect/tests_sh_redirect.py +++ b/bin/tests/system/redirect/tests_sh_redirect.py @@ -9,6 +9,38 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns1/K*", + "ns1/*.signed", + "ns1/dsset-nsec3.", + "ns1/dsset-signed.", + "ns1/nsec3.db", + "ns1/signed.db", + "ns2/example.db", + "ns2/named.stats", + "ns2/redirect.db", + "ns3/K*", + "ns3/*.signed", + "ns3/dsset-nsec3.", + "ns3/dsset-signed.", + "ns3/nsec3.db", + "ns3/signed.db", + "ns4/example.db", + "ns4/named.stats", + "ns5/K*", + "ns5/dsset-*", + "ns5/*.signed", + "ns5/root.db", + "ns5/sign.ns5.*", + "ns5/signed.db", + "ns6/signed.db.signed", + ] +) + def test_redirect(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/resolver/clean.sh b/bin/tests/system/resolver/clean.sh deleted file mode 100644 index 1d9865138f..0000000000 --- a/bin/tests/system/resolver/clean.sh +++ /dev/null @@ -1,39 +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. - -# -# Clean up after resolver tests. -# -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run ./*/named.run.prev -rm -f ./*/ans.run -rm -f ./*/*.jdb -rm -f dig.out dig.out.* dig.*.out.* -rm -f dig.*.foo.* -rm -f dig.*.bar.* -rm -f dig.*.prime.* -rm -f nextpart.out.* -rm -f ns4/tld.db -rm -f ns6/K* -rm -f ns6/example.net.db.signed ns6/example.net.db -rm -f ns6/ds.example.net.db.signed ns6/ds.example.net.db -rm -f ns6/dsset-ds.example.net* -rm -f ns6/dsset-example.net* ns6/example.net.db.signed.jnl -rm -f ns6/named.stats* -rm -f ns6/to-be-removed.tld.db ns6/to-be-removed.tld.db.jnl -rm -f ns7/server.db ns7/server.db.jnl -rm -f resolve.out.*.test* -rm -f .digrc -rm -f ns5/trusted.conf -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/resolver/tests_sh_resolver.py b/bin/tests/system/resolver/tests_sh_resolver.py index d8de300aa0..6e5a7967df 100644 --- a/bin/tests/system/resolver/tests_sh_resolver.py +++ b/bin/tests/system/resolver/tests_sh_resolver.py @@ -9,6 +9,35 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + ".digrc", + "dig*.out*", + "dig.*.foo.*", + "dig.*.bar.*", + "dig.*.prime.*", + "nextpart.out.*", + "ans*/ans.run", + "ans*/query.log", + "ns4/tld.db", + "ns5/trusted.conf", + "ns6/K*", + "ns6/ds.example.net.db", + "ns6/ds.example.net.db.signed", + "ns6/dsset-ds.example.net.", + "ns6/dsset-example.net.", + "ns6/example.net.db", + "ns6/example.net.db.signed", + "ns6/example.net.db.signed.jnl", + "ns6/to-be-removed.tld.db", + "ns6/to-be-removed.tld.db.jnl", + "ns7/server.db", + "ns7/server.db.jnl", + ] +) + def test_resolver(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/rndc/clean.sh b/bin/tests/system/rndc/clean.sh deleted file mode 100644 index 3b959f5a9f..0000000000 --- a/bin/tests/system/rndc/clean.sh +++ /dev/null @@ -1,36 +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 dig.out.*.test* -rm -f ns*/*.nta -rm -f ns*/managed-keys.bind* ns*/*.mkeys* -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run ns*/named.run.prev -rm -f ns2/named.stats -rm -f ns2/named_dump.db* -rm -f ns2/nil.db ns2/other.db ns2/static.db ns2/*.jnl -rm -f ns2/secondkey.conf -rm -f ns2/session.key -rm -f ns3/named_dump.db* -rm -f ns4/*.nta -rm -f ns4/example.db ns4/example.db.jnl -rm -f ns4/key?.conf -rm -f ns6/huge.zone.db -rm -f ns7/include.db ns7/test.db ns7/*.jnl -rm -f ns7/named_dump.db* -rm -f nsupdate.out.*.test* -rm -f nsupdate.out.test* -rm -f python.out.*.test* -rm -f rndc.out.*.test* -rm -f rndc.out.test* diff --git a/bin/tests/system/rndc/tests_cve-2023-3341.py b/bin/tests/system/rndc/tests_cve-2023-3341.py index 3860ec602f..c195a0db10 100644 --- a/bin/tests/system/rndc/tests_cve-2023-3341.py +++ b/bin/tests/system/rndc/tests_cve-2023-3341.py @@ -20,6 +20,20 @@ import isctest pytest.importorskip("dns") import dns.message +pytestmark = pytest.mark.extra_artifacts( + [ + "ns2/nil.db", + "ns2/other.db", + "ns2/secondkey.conf", + "ns2/static.db", + "ns4/example.db", + "ns4/key*.conf", + "ns6/huge.zone.db", + "ns7/include.db", + "ns7/test.db", + ] +) + def test_cve_2023_3341(control_port): depth = 4500 diff --git a/bin/tests/system/rndc/tests_sh_rndc.py b/bin/tests/system/rndc/tests_sh_rndc.py index ac6a4dc930..c7ab007983 100644 --- a/bin/tests/system/rndc/tests_sh_rndc.py +++ b/bin/tests/system/rndc/tests_sh_rndc.py @@ -9,6 +9,31 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest -def test_rndc(run_tests_sh): - run_tests_sh() +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "nsupdate.out.*", + "rndc.out.*", + "ns2/*.jnl", + "ns2/named.stats", + "ns2/named_dump.db.*", + "ns2/nil.db", + "ns2/other.db", + "ns2/secondkey.conf", + "ns2/static.db", + "ns3/all.nta", + "ns3/named_dump.db.*", + "ns3/none.nta", + "ns4/example.db", + "ns4/example.db.jnl", + "ns4/key*.conf", + "ns4/normal.nta", + "ns4/view with a space.nta", + "ns6/huge.zone.db", + "ns7/include.db", + "ns7/test.db", + "ns7/test.db.jnl", + ] +) diff --git a/bin/tests/system/rootkeysentinel/clean.sh b/bin/tests/system/rootkeysentinel/clean.sh deleted file mode 100644 index e9cd3cc2d6..0000000000 --- a/bin/tests/system/rootkeysentinel/clean.sh +++ /dev/null @@ -1,26 +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 dig.out.ns?.test* -rm -f */dsset-* -rm -f */named.conf -rm -f */named.memstats -rm -f */named.run -rm -f */trusted.conf -rm -f ns1/K.* -rm -f ns1/root.db -rm -f ns1/root.db.signed -rm -f ns2/Kexample.* -rm -f ns2/example.db -rm -f ns2/example.db.signed -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/rootkeysentinel/tests_sh_rootkeysentinel.py b/bin/tests/system/rootkeysentinel/tests_sh_rootkeysentinel.py index d1090d0972..2e66b580d9 100644 --- a/bin/tests/system/rootkeysentinel/tests_sh_rootkeysentinel.py +++ b/bin/tests/system/rootkeysentinel/tests_sh_rootkeysentinel.py @@ -9,6 +9,22 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns*/dsset-*", + "ns*/trusted.conf", + "ns1/K*", + "ns1/root.db", + "ns1/root.db.signed", + "ns2/Kexample*", + "ns2/example.db", + "ns2/example.db.signed", + ] +) + def test_rootkeysentinel(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/rpz/clean.sh b/bin/tests/system/rpz/clean.sh deleted file mode 100644 index a2127e0e3d..0000000000 --- a/bin/tests/system/rpz/clean.sh +++ /dev/null @@ -1,33 +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 ns*/*.key ns*/*.private -rm -f ns2/tld2s.db */bl.tld2.db */bl.tld2s.db -rm -f ns3/bl*.db ns3/fast-expire.db ns*/empty.db -rm -f ns3/manual-update-rpz.db -rm -f ns3/mixed-case-rpz.db -rm -f ns5/example.db ns5/bl.db ns5/fast-expire.db ns5/expire.conf -rm -f ns8/manual-update-rpz.db -rm -f */policy2.db -rm -f */*.jnl -rm -f dnsrps.cache dnsrps.conf -rm -f proto.* dsset-* trusted.conf dig.out* nsupdate.tmp ns*/*tmp -rm -f ns5/requests ns5/*.perf -rm -f */named.memstats */*.run */*.run.prev */named.stats */session.key -rm -f */*.log */*core */*.pid -rm -f ns*/named.lock -rm -f ns*/named.conf -rm -f ns*/*switch -rm -f dnsrps.zones -rm -f ns*/managed-keys.bind* -rm -f tmp diff --git a/bin/tests/system/rpz/tests_sh_rpz.py b/bin/tests/system/rpz/tests_sh_rpz.py index 1d551b53a0..6857138709 100644 --- a/bin/tests/system/rpz/tests_sh_rpz.py +++ b/bin/tests/system/rpz/tests_sh_rpz.py @@ -9,6 +9,56 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out*", + "dnsrps.cache", + "dnsrps.conf", + "dnsrps.zones", + "proto.*", + "trusted.conf", + "ns2/K*", + "ns2/bl.tld2.db", + "ns2/tld2s.db", + "ns3/bl-2.db", + "ns3/bl-cname.db", + "ns3/bl-disabled.db", + "ns3/bl-drop.db", + "ns3/bl-garden.db", + "ns3/bl-given.db", + "ns3/bl-no-op.db", + "ns3/bl-nodata.db", + "ns3/bl-nxdomain.db", + "ns3/bl-passthru.db", + "ns3/bl-tcp-only.db", + "ns3/bl-wildcname.db", + "ns3/bl.db", + "ns3/bl.tld2.db", + "ns3/fast-expire.db", + "ns3/manual-update-rpz.db", + "ns3/mixed-case-rpz.db", + "ns3/named.conf.tmp", + "ns3/named.stats", + "ns5/bl.db", + "ns5/empty.db", + "ns5/empty.db.jnl", + "ns5/example.db", + "ns5/expire.conf", + "ns5/fast-expire.db", + "ns5/named.stats", + "ns5/policy2.db", + "ns5/policy2.db.jnl", + "ns5/rpz-switch", + "ns6/bl.tld2s.db", + "ns6/empty.db", + "ns6/named.stats", + "ns7/policy2.db", + "ns8/manual-update-rpz.db", + ] +) + def test_rpz(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/rpz/tests_sh_rpz_dnsrps.py b/bin/tests/system/rpz/tests_sh_rpz_dnsrps.py index cca6f4d765..4b8b43a649 100644 --- a/bin/tests/system/rpz/tests_sh_rpz_dnsrps.py +++ b/bin/tests/system/rpz/tests_sh_rpz_dnsrps.py @@ -9,9 +9,60 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + import isctest.mark -pytestmark = isctest.mark.dnsrps_enabled +pytestmark = [ + isctest.mark.dnsrps_enabled, + pytest.mark.extra_artifacts( + [ + "dig.out*", + "dnsrps.cache", + "dnsrps.conf", + "dnsrps.zones", + "proto.*", + "trusted.conf", + "ns2/K*", + "ns2/bl.tld2.db", + "ns2/tld2s.db", + "ns3/bl-2.db", + "ns3/bl-cname.db", + "ns3/bl-disabled.db", + "ns3/bl-drop.db", + "ns3/bl-garden.db", + "ns3/bl-given.db", + "ns3/bl-no-op.db", + "ns3/bl-nodata.db", + "ns3/bl-nxdomain.db", + "ns3/bl-passthru.db", + "ns3/bl-tcp-only.db", + "ns3/bl-wildcname.db", + "ns3/bl.db", + "ns3/bl.tld2.db", + "ns3/fast-expire.db", + "ns3/manual-update-rpz.db", + "ns3/mixed-case-rpz.db", + "ns3/named.conf.tmp", + "ns3/named.stats", + "ns5/bl.db", + "ns5/empty.db", + "ns5/empty.db.jnl", + "ns5/example.db", + "ns5/expire.conf", + "ns5/fast-expire.db", + "ns5/named.stats", + "ns5/policy2.db", + "ns5/policy2.db.jnl", + "ns5/rpz-switch", + "ns6/bl.tld2s.db", + "ns6/empty.db", + "ns6/named.stats", + "ns7/policy2.db", + "ns8/manual-update-rpz.db", + ] + ), +] def test_rpz_dnsrps(run_tests_sh): diff --git a/bin/tests/system/rpzextra/clean.sh b/bin/tests/system/rpzextra/clean.sh deleted file mode 100644 index 50fe41b3b9..0000000000 --- a/bin/tests/system/rpzextra/clean.sh +++ /dev/null @@ -1,20 +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 ns*/*.jnl -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run -rm -f ns*/rpz*.txt -rm -rf __pycache__ -rm -f ns3/*-rpz-external.local.db diff --git a/bin/tests/system/rpzextra/tests_rpzextra.py b/bin/tests/system/rpzextra/tests_rpzextra.py index bf2fe94c6b..359b7aab43 100644 --- a/bin/tests/system/rpzextra/tests_rpzextra.py +++ b/bin/tests/system/rpzextra/tests_rpzextra.py @@ -20,6 +20,13 @@ from isctest.compat import dns_rcode import dns.message +pytestmark = pytest.mark.extra_artifacts( + [ + "ns3/*-rpz-external.local.db", + "ns3/rpz*.txt", + ] +) + @pytest.mark.parametrize( "qname,source,rcode", diff --git a/bin/tests/system/rpzrecurse/clean.sh b/bin/tests/system/rpzrecurse/clean.sh deleted file mode 100644 index fd383b0f44..0000000000 --- a/bin/tests/system/rpzrecurse/clean.sh +++ /dev/null @@ -1,34 +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. - -# Clean up after rpz tests. - -rm -f dig.out.* - -rm -f ns*/named.memstats -rm -f ns*/*.run -rm -f ns*/*core *core -rm -f ns*/named.conf - -rm -f ns2/*.local -rm -f ns2/*.queries -rm -f ns2/named.[0-9]*.conf -rm -f ns2/named.conf.header - -rm -f ns3/named.conf -rm -f ns3/named.run.prev - -rm -f dnsrps.cache -rm -f dnsrps*.conf -rm -f ns*/session.key -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/rpzrecurse/tests_sh_rpzrecurse.py b/bin/tests/system/rpzrecurse/tests_sh_rpzrecurse.py index 903ac49820..983c6c3c33 100644 --- a/bin/tests/system/rpzrecurse/tests_sh_rpzrecurse.py +++ b/bin/tests/system/rpzrecurse/tests_sh_rpzrecurse.py @@ -9,6 +9,21 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "dnsrps.cache", + "dnsrps.conf", + "ans*/ans.run", + "ns2/*.queries", + "ns2/*.local", + "ns2/named.*.conf", + "ns2/named.conf.header", + ] +) + def test_rpzrecurse(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/rpzrecurse/tests_sh_rpzrecurse_dnsrps.py b/bin/tests/system/rpzrecurse/tests_sh_rpzrecurse_dnsrps.py index 22f1ea2e12..a32d70cd7a 100644 --- a/bin/tests/system/rpzrecurse/tests_sh_rpzrecurse_dnsrps.py +++ b/bin/tests/system/rpzrecurse/tests_sh_rpzrecurse_dnsrps.py @@ -9,9 +9,25 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + import isctest.mark -pytestmark = isctest.mark.dnsrps_enabled +pytestmark = [ + isctest.mark.dnsrps_enabled, + pytest.mark.extra_artifacts( + [ + "dig.out.*", + "dnsrps.cache", + "dnsrps.conf", + "ans*/ans.run", + "ns2/*.queries", + "ns2/*.local", + "ns2/named.*.conf", + "ns2/named.conf.header", + ] + ), +] def test_rpzrecurse_dnsrps(run_tests_sh): diff --git a/bin/tests/system/rrchecker/tests_rrchecker.py b/bin/tests/system/rrchecker/tests_rrchecker.py index 0bdde9ea4a..e7883539b0 100644 --- a/bin/tests/system/rrchecker/tests_rrchecker.py +++ b/bin/tests/system/rrchecker/tests_rrchecker.py @@ -11,9 +11,16 @@ import os -import isctest import pytest +import isctest + +pytestmark = pytest.mark.extra_artifacts( + [ + "tempzone", + ] +) + @pytest.mark.parametrize( "option,expected_result", diff --git a/bin/tests/system/rrl/clean.sh b/bin/tests/system/rrl/clean.sh deleted file mode 100644 index 2d41acadd3..0000000000 --- a/bin/tests/system/rrl/clean.sh +++ /dev/null @@ -1,20 +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. - -# Clean up after rrl tests. - -rm -f */named.memstats */named.run */named.stats */log-* */session.key -rm -f dig.out* *mdig.out* -rm -f ns*/managed-keys.bind* -rm -f ns*/named.conf -rm -f ns3/bl*.db */*.jnl */*.core */*.pid diff --git a/bin/tests/system/rrl/tests_sh_rrl.py b/bin/tests/system/rrl/tests_sh_rrl.py index c32305b5d7..99be723c93 100644 --- a/bin/tests/system/rrl/tests_sh_rrl.py +++ b/bin/tests/system/rrl/tests_sh_rrl.py @@ -9,8 +9,19 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + import isctest.mark +pytestmark = pytest.mark.extra_artifacts( + [ + "*mdig.out*", + "dig.out.*", + "ns*/log-*", + "ns2/named.stats", + ] +) + # The rrl is known to be quite unstable. GL #172 @isctest.mark.flaky(max_runs=2) diff --git a/bin/tests/system/rrsetorder/clean.sh b/bin/tests/system/rrsetorder/clean.sh deleted file mode 100644 index ce58c840fb..0000000000 --- a/bin/tests/system/rrsetorder/clean.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. - -rm -f dig.out.test* -rm -f dig.out.cyclic dig.out.fixed dig.out.random dig.out.nomatch dig.out.none -rm -f dig.out.0 dig.out.1 dig.out.2 dig.out.3 -rm -f dig.out.cyclic2 -rm -f ns2/root.bk -rm -f ns?/named.run ns?/named.core -rm -f */named.memstats -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/rrsetorder/tests_sh_rrsetorder.py b/bin/tests/system/rrsetorder/tests_sh_rrsetorder.py index e413f97967..f23dd096a5 100644 --- a/bin/tests/system/rrsetorder/tests_sh_rrsetorder.py +++ b/bin/tests/system/rrsetorder/tests_sh_rrsetorder.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns2/root.bk", + ] +) + def test_rrsetorder(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/rsabigexponent/clean.sh b/bin/tests/system/rsabigexponent/clean.sh deleted file mode 100644 index c2554f2498..0000000000 --- a/bin/tests/system/rsabigexponent/clean.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. - -rm -f K* */K* */dsset-*. */*.signed */trusted.conf */tmp* -rm -f ns*/dsset-example -rm -f ns*/named.run -rm -f ns*/named.memstats -rm -f ns1/root.db -rm -f ns2/signer.err -rm -f dig.out.* -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/rsabigexponent/tests_rsabigexponent.py b/bin/tests/system/rsabigexponent/tests_rsabigexponent.py index c0c288e652..571fe2fe13 100644 --- a/bin/tests/system/rsabigexponent/tests_rsabigexponent.py +++ b/bin/tests/system/rsabigexponent/tests_rsabigexponent.py @@ -17,6 +17,19 @@ import pytest import isctest +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "options.conf", + "ns*/dsset-*", + "ns*/K*", + "ns*/trusted.conf", + "ns*/*.signed", + "ns1/root.db", + "ns2/signer.err", + ] +) + CHECKCONF = os.environ["CHECKCONF"] diff --git a/bin/tests/system/runtime/clean.sh b/bin/tests/system/runtime/clean.sh deleted file mode 100644 index e61a7af368..0000000000 --- a/bin/tests/system/runtime/clean.sh +++ /dev/null @@ -1,25 +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. - -[ -d ns2/nope ] && chmod 755 ns2/nope - -rm -f *.pid -rm -f */named*.run -rm -f */named.memstats -rm -f kill*.out -rm -f ns*/managed-keys.bind* -rm -f ns*/named*.pid -rm -f ns2/named.conf ns2/named-alt*.conf -rm -f rndc.out* -rm -rf ns2/nope -rm -rf ns2/tmp.* diff --git a/bin/tests/system/runtime/tests_sh_runtime.py b/bin/tests/system/runtime/tests_sh_runtime.py index 089690e256..dee5d643ef 100644 --- a/bin/tests/system/runtime/tests_sh_runtime.py +++ b/bin/tests/system/runtime/tests_sh_runtime.py @@ -9,6 +9,18 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "rndc.out.*", + "ns2/named-alt*.conf", + "ns2/named*.run", + "ns2/nope", + "ns2/tmp.*", + ] +) + def test_runtime(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/serve-stale/clean.sh b/bin/tests/system/serve-stale/clean.sh deleted file mode 100644 index b4a0d5070e..0000000000 --- a/bin/tests/system/serve-stale/clean.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. - -rm -f dig.out* -rm -f ns*/named.conf -rm -f ns*/root.bk -rm -f rndc.out.test* -rm -f */named.run */named.memstats -rm -f ns*/managed-keys.bind* -rm -f ns*/named_dump* -rm -f ns*/named.stats* -rm -f ns*/named.run.prev diff --git a/bin/tests/system/serve-stale/tests_sh_serve_stale.py b/bin/tests/system/serve-stale/tests_sh_serve_stale.py index 3e6d3a1981..18b84e8b79 100644 --- a/bin/tests/system/serve-stale/tests_sh_serve_stale.py +++ b/bin/tests/system/serve-stale/tests_sh_serve_stale.py @@ -9,6 +9,20 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.out.*", + "ans*/ans.run", + "ns*/named.stats*", + "ns*/named_dump*", + "ns*/named.stats*", + "ns*/root.bk", + ] +) + def test_serve_stale(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/sfcache/clean.sh b/bin/tests/system/sfcache/clean.sh deleted file mode 100644 index 2d380fcdb6..0000000000 --- a/bin/tests/system/sfcache/clean.sh +++ /dev/null @@ -1,26 +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 - -rm -f ./*/K*.key ./*/K*.private ./*/*.signed ./*/*.db ./*/dsset-* -rm -f ./*/managed.conf ./*/trusted.conf -rm -f ./*/named.memstats -rm -f ./*/named.conf -rm -f ./*/named.run ./*/named.run.prev -rm -f ./dig.* -rm -f ./rndc.* -rm -f ./sfcache.* -rm -f ./ns*/managed-keys.bind* -rm -f ./ns5/named.run.part* -rm -f ./ns5/named_dump* diff --git a/bin/tests/system/sfcache/tests_sh_sfcache.py b/bin/tests/system/sfcache/tests_sh_sfcache.py index d323b395c4..043c5269ce 100644 --- a/bin/tests/system/sfcache/tests_sh_sfcache.py +++ b/bin/tests/system/sfcache/tests_sh_sfcache.py @@ -9,6 +9,25 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.out.*", + "sfcache.*", + "ns*/*.db", + "ns*/*.signed", + "ns*/dsset-*", + "ns*/K*.key", + "ns*/K*.private", + "ns*/managed.conf", + "ns*/trusted.conf", + "ns5/named.run.*", + "ns5/named_dump*", + ] +) + def test_sfcache(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/shutdown/clean.sh b/bin/tests/system/shutdown/clean.sh deleted file mode 100644 index 0f949a42bd..0000000000 --- a/bin/tests/system/shutdown/clean.sh +++ /dev/null @@ -1,19 +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 ns*/*.jnl -rm -f ns*/named.memstats -rm -f ns*/rpz*.txt -rm -f */named.conf -rm -f */named.run -rm -rf __pycache__ diff --git a/bin/tests/system/shutdown/tests_shutdown.py b/bin/tests/system/shutdown/tests_shutdown.py index 93c4c3c704..3c168a6556 100755 --- a/bin/tests/system/shutdown/tests_shutdown.py +++ b/bin/tests/system/shutdown/tests_shutdown.py @@ -26,6 +26,13 @@ import dns.exception import isctest +pytestmark = pytest.mark.extra_artifacts( + [ + "resolver/named.conf", + "resolver/named.run", + ] +) + def do_work(named_proc, resolver_ip, instance, kill_method, n_workers, n_queries): """Creates a number of A queries to run in parallel diff --git a/bin/tests/system/smartsign/clean.sh b/bin/tests/system/smartsign/clean.sh deleted file mode 100644 index 7acfdfa349..0000000000 --- a/bin/tests/system/smartsign/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 K* dsset-* *.signed dnskey.sigs other.sigs dsset.out diff --git a/bin/tests/system/smartsign/tests_sh_smartsign.py b/bin/tests/system/smartsign/tests_sh_smartsign.py index e291b64eec..68b0bf4ea5 100644 --- a/bin/tests/system/smartsign/tests_sh_smartsign.py +++ b/bin/tests/system/smartsign/tests_sh_smartsign.py @@ -9,6 +9,19 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "*.signed", + "K*", + "dnskey.sigs", + "dsset-*", + "dsset.out", + "other.sigs", + ] +) + def test_smartsign(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/sortlist/clean.sh b/bin/tests/system/sortlist/clean.sh deleted file mode 100644 index afbae2d37a..0000000000 --- a/bin/tests/system/sortlist/clean.sh +++ /dev/null @@ -1,17 +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 */named.memstats -rm -f */named.run -rm -f */named.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/spf/clean.sh b/bin/tests/system/spf/clean.sh deleted file mode 100644 index c0ca9ebc77..0000000000 --- a/bin/tests/system/spf/clean.sh +++ /dev/null @@ -1,17 +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 ns1/named.run -rm -f ns1/named.memstats -rm -f ns*/named.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/staticstub/clean.sh b/bin/tests/system/staticstub/clean.sh deleted file mode 100755 index 50202e293a..0000000000 --- a/bin/tests/system/staticstub/clean.sh +++ /dev/null @@ -1,27 +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 tmp -rm -f dig.out.* -rm -f ns*/named.conf -rm -f ns3/example.db -rm -f ns3/undelegated.db -rm -f ns4/sub.example.db -rm -f ns?/named.memstats -rm -f ns?/named.run -rm -f ns?/named_dump.db -rm -rf */*.signed -rm -rf */K* -rm -rf */dsset-* -rm -rf */trusted.conf -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/staticstub/tests_sh_staticstub.py b/bin/tests/system/staticstub/tests_sh_staticstub.py index 52c661c3e8..208326732e 100644 --- a/bin/tests/system/staticstub/tests_sh_staticstub.py +++ b/bin/tests/system/staticstub/tests_sh_staticstub.py @@ -9,6 +9,22 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "tmp", + "ns*/trusted.conf", + "ns*/dsset-*", + "ns*/K*", + "ns*/*.signed", + "ns3/example.db", + "ns3/undelegated.db", + "ns4/sub.example.db", + ] +) + def test_staticstub(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/statistics/clean.sh b/bin/tests/system/statistics/clean.sh deleted file mode 100644 index a1fc8d0288..0000000000 --- a/bin/tests/system/statistics/clean.sh +++ /dev/null @@ -1,31 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f ns3/example.bk -rm -f ns3/internal.bk -rm -f */named.conf -rm -f */named.memstats -rm -f */named.run -rm -f */ans.run -rm -f */named.stats -rm -f */named.stats-stage* -rm -f dig.out* -rm -f curl.out.* -rm -f stats*out -rm -f ns*/managed-keys.bind* -rm -f xsltproc.out.* -rm -f named.stats.* ns*/named.stats.* diff --git a/bin/tests/system/statistics/tests_sh_statistics.py b/bin/tests/system/statistics/tests_sh_statistics.py index d87688f0dc..c96bb28808 100644 --- a/bin/tests/system/statistics/tests_sh_statistics.py +++ b/bin/tests/system/statistics/tests_sh_statistics.py @@ -9,6 +9,20 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "curl.out.*", + "dig.out.*", + "named.stats.*", + "stats.xml.out", + "xsltproc.out.*", + "ans*/ans.run", + "ns*/statistics-channels.conf", + ] +) + def test_statistics(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/statschannel/clean.sh b/bin/tests/system/statschannel/clean.sh deleted file mode 100644 index d1ce8d27d2..0000000000 --- a/bin/tests/system/statschannel/clean.sh +++ /dev/null @@ -1,35 +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 ./Kdnssec* -rm -f bind9.xsl.1 bind9.xsl.2 bind9.xsl.3 -rm -f compressed.headers regular.headers compressed.out regular.out -rm -f dig.out* -rm -f nc.out* curl.out* header.in* -rm -f ns*/managed-keys.bind* -rm -f ns*/named.conf -rm -f ns*/named.memstats -rm -f ns*/named.run* -rm -f ns*/named.stats -rm -f ns*/signzone.out.* -rm -f ns2/*.db.signed* ns2/dsset-*. ns2/*.jbk -rm -f ns2/Kdnssec* ns2/dnssec.*.id -rm -f ns2/Kmanykeys* ns2/manykeys.*.id -rm -f ns2/dnssec.db.signed* ns2/dsset-dnssec. -rm -f ns3/*.db -rm -f traffic traffic.out.* traffic.json.* traffic.xml.* -rm -f xml.*mem json.*mem -rm -f xml.*stats json.*stats -rm -f zones zones.out.* zones.json.* zones.xml.* zones.expect.* -rm -f xfrins xfrins.* -rm -rf ./__pycache__ diff --git a/bin/tests/system/statschannel/tests_json.py b/bin/tests/system/statschannel/tests_json.py index ef4696cdcf..62f8bcab14 100755 --- a/bin/tests/system/statschannel/tests_json.py +++ b/bin/tests/system/statschannel/tests_json.py @@ -20,9 +20,28 @@ import isctest.mark pytest.register_assert_rewrite("generic") import generic -pytestmark = isctest.mark.have_json_c requests = pytest.importorskip("requests") +pytestmark = [ + isctest.mark.have_json_c, + pytest.mark.extra_artifacts( + [ + "ns2/*.jnl", + "ns2/*.signed", + "ns2/dsset-*", + "ns2/K*", + "ns2/dnssec.db.signed", + "ns2/dnssec.*.id", + "ns2/manykeys.*.id", + "ns2/signzone.out.*", + "ns3/_default.nzd", + "ns3/example-tcp.db", + "ns3/example-tls.db", + "ns3/example.db", + ] + ), +] + # JSON helper functions def fetch_zones_json(statsip, statsport): diff --git a/bin/tests/system/statschannel/tests_sh_statschannel.py b/bin/tests/system/statschannel/tests_sh_statschannel.py index 85d5d14acf..2f7a826aa4 100644 --- a/bin/tests/system/statschannel/tests_sh_statschannel.py +++ b/bin/tests/system/statschannel/tests_sh_statschannel.py @@ -9,6 +9,43 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "K*", + "bind9.xsl.1", + "bind9.xsl.2", + "compressed.headers", + "compressed.out", + "curl.*", + "dig.out.*", + "header.in*", + "json.*", + "nc.out*", + "regular.headers", + "regular.out", + "xfrins*", + "xml.*mem", + "xml.*stats", + "zones*", + "ns2/*.jnl", + "ns2/*.signed", + "ns2/dsset-*", + "ns2/K*", + "ns2/dnssec.*.id", + "ns2/manykeys.*.id", + "ns2/named.stats", + "ns2/signzone.out.*", + "ns3/_default.nzf*", + "ns3/_default.nzd*", + "ns3/example-new.db", + "ns3/example-tcp.db", + "ns3/example-tls.db", + "ns3/example.db", + ] +) + def test_statschannel(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/statschannel/tests_xml.py b/bin/tests/system/statschannel/tests_xml.py index 93ba0bdb2f..e301f6bf60 100755 --- a/bin/tests/system/statschannel/tests_xml.py +++ b/bin/tests/system/statschannel/tests_xml.py @@ -21,9 +21,27 @@ import isctest.mark pytest.register_assert_rewrite("generic") import generic -pytestmark = isctest.mark.have_libxml2 requests = pytest.importorskip("requests") +pytestmark = [ + isctest.mark.have_libxml2, + pytest.mark.extra_artifacts( + [ + "ns2/K*", + "ns2/*.jnl", + "ns2/*.signed", + "ns2/dsset-*", + "ns2/dnssec.*.id", + "ns2/manykeys.*.id", + "ns2/signzone.out.*", + "ns3/_default.nzd", + "ns3/example-tcp.db", + "ns3/example-tls.db", + "ns3/example.db", + ] + ), +] + # XML helper functions def fetch_zones_xml(statsip, statsport): diff --git a/bin/tests/system/stress/clean.sh b/bin/tests/system/stress/clean.sh deleted file mode 100644 index cf460f867f..0000000000 --- a/bin/tests/system/stress/clean.sh +++ /dev/null @@ -1,21 +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 ns?/zone*.bk - -rm -f ns2/zone0*.db -rm -f ns2/zone0*.jnl -rm -f */named.memstats -rm -f ns*/managed-keys.bind* -rm -f ns*/named.run -rm -f ns*/named.conf diff --git a/bin/tests/system/stress/tests_stress_update.py b/bin/tests/system/stress/tests_stress_update.py index f621da7c7b..2d5eefd3bf 100644 --- a/bin/tests/system/stress/tests_stress_update.py +++ b/bin/tests/system/stress/tests_stress_update.py @@ -13,9 +13,17 @@ import concurrent.futures import os import time +import dns.update +import pytest + import isctest -import dns.update +pytestmark = pytest.mark.extra_artifacts( + [ + "ns2/zone0*.db", + "ns2/zone0*.jnl", + ] +) def rndc_loop(test_state, server): diff --git a/bin/tests/system/stub/clean.sh b/bin/tests/system/stub/clean.sh deleted file mode 100644 index 11984101af..0000000000 --- a/bin/tests/system/stub/clean.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. - -# -# Clean up after stub tests. -# -rm -f dig.out.ns[35] ns3/child.example.st -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f ns*/managed-keys.bind* -rm -f ns5/example.db diff --git a/bin/tests/system/stub/tests_sh_stub.py b/bin/tests/system/stub/tests_sh_stub.py index 311e450687..7511f26bfa 100644 --- a/bin/tests/system/stub/tests_sh_stub.py +++ b/bin/tests/system/stub/tests_sh_stub.py @@ -9,6 +9,16 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns3/child.example.st", + "ns5/example.db", + ] +) + def test_stub(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/synthfromdnssec/clean.sh b/bin/tests/system/synthfromdnssec/clean.sh deleted file mode 100644 index bd86173f85..0000000000 --- a/bin/tests/system/synthfromdnssec/clean.sh +++ /dev/null @@ -1,50 +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 - -rm -f ./*/named.memstats -rm -f ./*/named.conf -rm -f ./*/named.run -rm -f ./*/named.run.prev -rm -f ./*/named.stats -rm -f ./dig.out.* -rm -f ./ns1/K*+*+*.key -rm -f ./ns1/K*+*+*.private -rm -f ./ns1/dsset-* -rm -f ./ns1/example.db -rm -f ./ns1/example.db.signed -rm -f ./ns1/insecure.example.db -rm -f ./ns1/insecure.example.db.signed -rm -f ./ns1/dnamed.db -rm -f ./ns1/dnamed.db.signed -rm -f ./ns1/minimal.db -rm -f ./ns1/minimal.db.signed -rm -f ./ns1/root.db -rm -f ./ns1/root.db.signed -rm -f ./ns1/soa-without-dnskey.db -rm -f ./ns1/soa-without-dnskey.db.signed -rm -f ./ns1/trusted.conf -rm -f ./ns2/named_dump.db -rm -f ./ns*/managed-keys.bind* -rm -f ./nodata.out ./insecure.nodata.out -rm -f ./nxdomain.out ./insecure.nxdomain.out -rm -f ./wild.out ./insecure.wild.out -rm -f ./wildcname.out ./insecure.wildcname.out -rm -f ./wildnodata1nsec.out ./insecure.wildnodata1nsec.out -rm -f ./wildnodata2nsec.out ./insecure.wildnodata2nsec.out -rm -f ./wildnodata2nsecafterdata.out ./insecure.wildnodata2nsecafterdata.out -rm -f ./minimal.nxdomain.out -rm -f ./black.out -rm -f ./xml.out* -rm -f ./json.out* diff --git a/bin/tests/system/synthfromdnssec/tests_sh_synthfromdnssec.py b/bin/tests/system/synthfromdnssec/tests_sh_synthfromdnssec.py index 5cbf8488ae..4a2918e27b 100644 --- a/bin/tests/system/synthfromdnssec/tests_sh_synthfromdnssec.py +++ b/bin/tests/system/synthfromdnssec/tests_sh_synthfromdnssec.py @@ -9,6 +9,50 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "black.out", + "dig.out.*", + "insecure.nodata.out", + "insecure.nxdomain.out", + "insecure.wild.out", + "insecure.wildcname.out", + "insecure.wildnodata1nsec.out", + "insecure.wildnodata2nsec.out", + "insecure.wildnodata2nsecafterdata.out", + "json.out*", + "minimal.nxdomain.out", + "nodata.out", + "nxdomain.out", + "wild.out", + "wildcname.out", + "wildnodata1nsec.out", + "wildnodata2nsec.out", + "wildnodata2nsecafterdata.out", + "xml.out*", + "ns*/named.stats", + "ns*/statistics-channels.conf", + "ns1/K*+*+*.key", + "ns1/K*+*+*.private", + "ns1/dnamed.db", + "ns1/dnamed.db.signed", + "ns1/dsset-*", + "ns1/example.db", + "ns1/example.db.signed", + "ns1/insecure.example.db", + "ns1/insecure.example.db.signed", + "ns1/minimal.db", + "ns1/minimal.db.signed", + "ns1/root.db", + "ns1/root.db.signed", + "ns1/soa-without-dnskey.db", + "ns1/soa-without-dnskey.db.signed", + "ns1/trusted.conf", + ] +) + def test_synthfromdnssec(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/tcp/clean.sh b/bin/tests/system/tcp/clean.sh deleted file mode 100644 index 4a25e92632..0000000000 --- a/bin/tests/system/tcp/clean.sh +++ /dev/null @@ -1,21 +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 ./*/named.memstats -rm -f ./*/named.run -rm -f ./*/named.conf -rm -f ./*/named.stats* -rm -f ans6/ans.run* -rm -f dig.out* -rm -f rndc.out* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/tcp/tests_sh_tcp.py b/bin/tests/system/tcp/tests_sh_tcp.py index b1d797c321..0e0c9fc0e5 100644 --- a/bin/tests/system/tcp/tests_sh_tcp.py +++ b/bin/tests/system/tcp/tests_sh_tcp.py @@ -9,6 +9,18 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "rndc.out.*", + "ans*/ans.run", + "ans*/ans.run.prev", + "ns*/named.stats.*", + ] +) + def test_tcp(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/tcp/tests_tcp.py b/bin/tests/system/tcp/tests_tcp.py index e09a267ac4..02c7d093be 100644 --- a/bin/tests/system/tcp/tests_tcp.py +++ b/bin/tests/system/tcp/tests_tcp.py @@ -23,6 +23,11 @@ pytest.importorskip("dns", minversion="2.0.0") import dns.message import dns.query +pytestmark = pytest.mark.extra_artifacts( + [ + "ans*/ans.run", + ] +) TIMEOUT = 10 diff --git a/bin/tests/system/timeouts/clean.sh b/bin/tests/system/timeouts/clean.sh deleted file mode 100644 index 01f3750d22..0000000000 --- a/bin/tests/system/timeouts/clean.sh +++ /dev/null @@ -1,20 +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 ./ns*/managed-keys.bind* -rm -f ./ns*/named.conf -rm -f ./ns*/named.memstats -rm -f ./ns*/named.run* -rm -f ./ns*/named.stats -rm -rf ./__pycache__ -rm -f ./ns*/large.db diff --git a/bin/tests/system/timeouts/tests_tcp_timeouts.py b/bin/tests/system/timeouts/tests_tcp_timeouts.py index c4d45b104d..cdee7a2e70 100644 --- a/bin/tests/system/timeouts/tests_tcp_timeouts.py +++ b/bin/tests/system/timeouts/tests_tcp_timeouts.py @@ -28,6 +28,11 @@ import dns.rdatatype import isctest.mark # pylint: disable=import-error +pytestmark = pytest.mark.extra_artifacts( + [ + "ns1/large.db", + ] +) TIMEOUT = 10 diff --git a/bin/tests/system/transport-acl/clean.sh b/bin/tests/system/transport-acl/clean.sh deleted file mode 100644 index e8d1b95ee5..0000000000 --- a/bin/tests/system/transport-acl/clean.sh +++ /dev/null @@ -1,24 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run -rm -f ./*/named.run.prev -rm -f ./dig.out.* -rm -f ./*/example.db -rm -rf ./headers.* diff --git a/bin/tests/system/transport-acl/tests_sh_transport_acl.py b/bin/tests/system/transport-acl/tests_sh_transport_acl.py index 400c85996e..50069bb9e8 100644 --- a/bin/tests/system/transport-acl/tests_sh_transport_acl.py +++ b/bin/tests/system/transport-acl/tests_sh_transport_acl.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns1/example.db", + ] +) + def test_transport_acl(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/transport-change/clean.sh b/bin/tests/system/transport-change/clean.sh deleted file mode 100644 index e8d1b95ee5..0000000000 --- a/bin/tests/system/transport-change/clean.sh +++ /dev/null @@ -1,24 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run -rm -f ./*/named.run.prev -rm -f ./dig.out.* -rm -f ./*/example.db -rm -rf ./headers.* diff --git a/bin/tests/system/transport-change/tests_sh_transport_change.py b/bin/tests/system/transport-change/tests_sh_transport_change.py index d86446389e..a4370b670e 100644 --- a/bin/tests/system/transport-change/tests_sh_transport_change.py +++ b/bin/tests/system/transport-change/tests_sh_transport_change.py @@ -9,6 +9,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns1/example.db", + ] +) + def test_transport_change(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/tsig/clean.sh b/bin/tests/system/tsig/clean.sh deleted file mode 100644 index 709333c4b4..0000000000 --- a/bin/tests/system/tsig/clean.sh +++ /dev/null @@ -1,26 +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. - -# -# Clean up after tsig tests. -# - -rm -f dig.out.* -rm -f */named.memstats -rm -f */named.conf -rm -f ns1/named-fips.conf -rm -f */named.run -rm -f Kexample.net.* -rm -f keygen.out? -rm -f ns*/managed-keys.bind* -rm -f packet.out diff --git a/bin/tests/system/tsig/tests_badtime.py b/bin/tests/system/tsig/tests_badtime.py index 8cf5d7b713..1a45e51ec0 100644 --- a/bin/tests/system/tsig/tests_badtime.py +++ b/bin/tests/system/tsig/tests_badtime.py @@ -23,6 +23,13 @@ import dns.message import dns.query import dns.tsigkeyring +pytestmark = pytest.mark.extra_artifacts( + [ + "ans*/ans.run", + "ns1/named-fips.conf", + ] +) + TIMEOUT = 10 diff --git a/bin/tests/system/tsig/tests_sh_tsig.py b/bin/tests/system/tsig/tests_sh_tsig.py index b421852c84..4c0a800bb5 100644 --- a/bin/tests/system/tsig/tests_sh_tsig.py +++ b/bin/tests/system/tsig/tests_sh_tsig.py @@ -9,6 +9,18 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "keygen.out*", + "packet.out", + "ans*/ans.run", + "ns1/named-fips.conf", + ] +) + def test_tsig(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/tsiggss/clean.sh b/bin/tests/system/tsiggss/clean.sh deleted file mode 100644 index 3c4fcf28db..0000000000 --- a/bin/tests/system/tsiggss/clean.sh +++ /dev/null @@ -1,27 +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. - -# -# Clean up after tsiggss tests. -# - -rm -f ns1/*.jnl ns1/update.txt ns1/auth.sock -rm -f ns1/*.db ns1/K*.key ns1/K*.private -rm -f ns1/_default.tsigkeys -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f authsock.pid -rm -f ns1/core -rm -f nsupdate.out* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py b/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py index 796da8fbc9..0d0ed03d7c 100755 --- a/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py +++ b/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py @@ -33,6 +33,13 @@ import dns.rdataclass import dns.rdatatype import dns.rrset +pytestmark = pytest.mark.extra_artifacts( + [ + "ns1/K*", + "ns1/example.nil.db", + ] +) + class CraftedTKEYQuery: """ diff --git a/bin/tests/system/tsiggss/tests_sh_tsiggss.py b/bin/tests/system/tsiggss/tests_sh_tsiggss.py index 926a9a9e6c..7dc8bc849e 100644 --- a/bin/tests/system/tsiggss/tests_sh_tsiggss.py +++ b/bin/tests/system/tsiggss/tests_sh_tsiggss.py @@ -9,6 +9,21 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "authsock.pid", + "nsupdate.out*", + "ns1/K*", + "ns1/_default.tsigkeys", + "ns1/auth.sock", + "ns1/example.nil.db", + "ns1/example.nil.db.jnl", + "ns1/update.txt", + ] +) + def test_tsiggss(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/ttl/clean.sh b/bin/tests/system/ttl/clean.sh deleted file mode 100644 index 3bb41d9247..0000000000 --- a/bin/tests/system/ttl/clean.sh +++ /dev/null @@ -1,17 +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 ./*/named.conf -rm -f ./*/named.memstats -rm -f ./*/named.run -rm -f ./ns*/managed-keys.bind* diff --git a/bin/tests/system/unknown/clean.sh b/bin/tests/system/unknown/clean.sh deleted file mode 100644 index e444d044ff..0000000000 --- a/bin/tests/system/unknown/clean.sh +++ /dev/null @@ -1,21 +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 dig.out* check.out -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f */*.bk -rm -f */*.bk.* -rm -f ns3/Kexample.* -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/unknown/tests_sh_unknown.py b/bin/tests/system/unknown/tests_sh_unknown.py index fe1f4512b9..40b4a0103b 100644 --- a/bin/tests/system/unknown/tests_sh_unknown.py +++ b/bin/tests/system/unknown/tests_sh_unknown.py @@ -9,6 +9,21 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "check.out", + "dig.out.*", + "ns2/example-in.bk", + "ns3/K*", + "ns3/example-in.bk", + "ns3/example-in.bk.jbk", + "ns3/example-in.bk.signed", + "ns3/example-in.bk.signed.jnl", + ] +) + def test_unknown(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/upforwd/clean.sh b/bin/tests/system/upforwd/clean.sh deleted file mode 100644 index d56c942069..0000000000 --- a/bin/tests/system/upforwd/clean.sh +++ /dev/null @@ -1,35 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f dig.out.ns1* dig.out.ns2 dig.out.ns1 dig.out.ns3 dig.out.ns1.after -rm -f ns1/*.jnl ns2/*.jnl ns3/*.jnl ns1/example.db ns2/*.bk ns3/*.bk -rm -f ns3/noprimary1.db -rm -f ns3/dnstap.out* -rm -f ns3/dnstap.conf -rm -f dnstap.out* -rm -f dnstapread.out* -rm -f */named.memstats -rm -f */named.run -rm -f */named.conf -rm -f */ans.run -rm -f Ksig0.example2.* -rm -f keyname keyname.err -rm -f ns1/example2.db -rm -f ns1/example2-toomanykeys.db -rm -f ns*/managed-keys.bind* -rm -f nsupdate.out.* -rm -f ns*/named.run.prev diff --git a/bin/tests/system/upforwd/tests_sh_upforwd.py b/bin/tests/system/upforwd/tests_sh_upforwd.py index 9b2a26364e..41b58227c4 100644 --- a/bin/tests/system/upforwd/tests_sh_upforwd.py +++ b/bin/tests/system/upforwd/tests_sh_upforwd.py @@ -13,6 +13,26 @@ import pytest import isctest.mark +pytestmark = pytest.mark.extra_artifacts( + [ + "Ksig0.example2*", + "dig.out.*", + "dnstap.out.*", + "dnstapread.out*", + "keyname*", + "nsupdate.out.*", + "ans*/ans.run", + "ns*/*.bk", + "ns*/*.jnl", + "ns1/example.db", + "ns1/example2-toomanykeys.db", + "ns1/example2.db", + "ns3/dnstap.conf", + "ns3/dnstap.out", + "ns3/noprimary1.db", + ] +) + @pytest.mark.xfail(reason="GL #4996", condition=isctest.mark.with_dnstap()) def test_upforwd(run_tests_sh): diff --git a/bin/tests/system/verify/tests_verify.py b/bin/tests/system/verify/tests_verify.py index be5e6ef741..ae82dee1c5 100644 --- a/bin/tests/system/verify/tests_verify.py +++ b/bin/tests/system/verify/tests_verify.py @@ -16,6 +16,19 @@ import pytest import isctest +pytestmark = pytest.mark.extra_artifacts( + [ + "verify.out.*", + "zones/K*", + "zones/dsset-*", + "zones/*.bad", + "zones/*.good", + "zones/*.out*", + "zones/*.tmp", + "zones/updated*", + ] +) + VERIFY = os.environ.get("VERIFY") diff --git a/bin/tests/system/views/clean.sh b/bin/tests/system/views/clean.sh deleted file mode 100644 index 3bb36296d2..0000000000 --- a/bin/tests/system/views/clean.sh +++ /dev/null @@ -1,37 +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 - -# -# Clean up after zone transfer tests. -# - -rm -f ns*/named.conf -rm -f ns3/example.bk dig.out.ns?.? -rm -f ns2/example.db ns3/internal.bk -rm -f -- */*.jnl -rm -f -- */named.memstats -rm -f -- */named.run */named.run.prev -rm -f ns2/external/K* -rm -f ns2/external/inline.db.jbk -rm -f ns2/external/inline.db.signed -rm -f ns2/external/inline.db.signed.jnl -rm -f ns2/internal/K* -rm -f ns2/internal/inline.db.jbk -rm -f ns2/internal/inline.db.signed -rm -f ns2/internal/inline.db.signed.jnl -rm -f ns2/zones.conf -rm -f ns2/db.* ns2/K* -rm -f dig.out.external dig.out.internal -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/views/tests_sh_views.py b/bin/tests/system/views/tests_sh_views.py index bfaacf4897..4e2d29e70d 100644 --- a/bin/tests/system/views/tests_sh_views.py +++ b/bin/tests/system/views/tests_sh_views.py @@ -9,6 +9,28 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns2/K*", + "ns2/db.*", + "ns2/*.jnl", + "ns2/example.db", + "ns2/zones.conf", + "ns2/external/K*", + "ns2/external/inline.db.jbk", + "ns2/external/inline.db.signed", + "ns2/external/inline.db.signed.jnl", + "ns2/internal/K*", + "ns2/internal/inline.db.jbk", + "ns2/internal/inline.db.signed", + "ns2/internal/inline.db.signed.jnl", + "ns3/internal.bk", + ] +) + def test_views(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/wildcard/clean.sh b/bin/tests/system/wildcard/clean.sh deleted file mode 100644 index 11af62d8ec..0000000000 --- a/bin/tests/system/wildcard/clean.sh +++ /dev/null @@ -1,27 +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 ns*/named.run -rm -f ns*/named.conf -rm -f ns1/K* -rm -f ns1/*.db -rm -f ns1/*.signed -rm -f ns1/dsset-* -rm -f ns1/keyset-* -rm -f ns1/trusted.conf -rm -f ns1/private.nsec.conf -rm -f ns1/private.nsec3.conf -rm -f ns1/signer.err -rm -f */named.memstats -rm -f dig.out.ns*.test* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/wildcard/tests_sh_wildcard.py b/bin/tests/system/wildcard/tests_sh_wildcard.py index 89a9fef605..db01be0e1e 100644 --- a/bin/tests/system/wildcard/tests_sh_wildcard.py +++ b/bin/tests/system/wildcard/tests_sh_wildcard.py @@ -9,6 +9,29 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out.*", + "ns1/K*", + "ns1/dsset-*", + "ns1/*.signed", + "ns1/allwild.db", + "ns1/example.db", + "ns1/nestedwild.db", + "ns1/nsec.db", + "ns1/nsec3.db", + "ns1/private.nsec.conf", + "ns1/private.nsec.db", + "ns1/private.nsec3.conf", + "ns1/private.nsec3.db", + "ns1/root.db", + "ns1/signer.err", + "ns1/trusted.conf", + ] +) + def test_wildcard(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/wildcard/tests_wildcard.py b/bin/tests/system/wildcard/tests_wildcard.py index 71a84e567f..37a4d15b2d 100755 --- a/bin/tests/system/wildcard/tests_wildcard.py +++ b/bin/tests/system/wildcard/tests_wildcard.py @@ -11,7 +11,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. - """ Example property-based test for wildcard synthesis. Verifies that otherwise-empty zone with single wildcard record * A 192.0.2.1 @@ -54,6 +53,26 @@ import isctest.check import isctest.name import isctest.query +pytestmark = pytest.mark.extra_artifacts( + [ + "ns1/K*", + "ns1/dsset-*", + "ns1/*.signed", + "ns1/allwild.db", + "ns1/example.db", + "ns1/nestedwild.db", + "ns1/nsec.db", + "ns1/nsec3.db", + "ns1/private.nsec.conf", + "ns1/private.nsec.db", + "ns1/private.nsec3.conf", + "ns1/private.nsec3.db", + "ns1/root.db", + "ns1/signer.err", + "ns1/trusted.conf", + ] +) + # labels of a zone with * A 192.0.2.1 wildcard SUFFIX = dns.name.from_text("allwild.test.") diff --git a/bin/tests/system/xfer/clean.sh b/bin/tests/system/xfer/clean.sh deleted file mode 100644 index 3cbcba5071..0000000000 --- a/bin/tests/system/xfer/clean.sh +++ /dev/null @@ -1,40 +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. - -# -# Clean up after zone transfer tests. -# - -rm -f */ans.run -rm -f */named.conf -rm -f */named.memstats -rm -f */named.run -rm -f */named.run.prev -rm -f axfr.out -rm -f dig.out.* -rm -f ns*/managed-keys.bind* -rm -f ns1/dot-fallback.db -rm -f ns1/edns-expire.db -rm -f ns1/ixfr-too-big.db ns1/ixfr-too-big.db.jnl -rm -f ns1/sec.db ns2/sec.db -rm -f ns2/example.db ns2/tsigzone.db ns2/example.db.jnl ns2/dot-fallback.db -rm -f ns2/mapped.db -rm -f ns3/example.bk ns3/xfer-stats.bk ns3/tsigzone.bk ns3/example.bk.jnl -rm -f ns3/mapped.bk -rm -f ns3/primary.bk ns3/primary.bk.jnl -rm -f ns4/*.db ns4/*.jnl -rm -f ns6/*.db ns6/*.bk ns6/*.jnl -rm -f ns7/*.db ns7/*.bk ns7/*.jnl -rm -f ns8/large.db ns8/small.db -rm -f stats.* -rm -f wait_for_message.* diff --git a/bin/tests/system/xfer/tests_sh_xfer.py b/bin/tests/system/xfer/tests_sh_xfer.py index c83d6e9692..d217b0becf 100644 --- a/bin/tests/system/xfer/tests_sh_xfer.py +++ b/bin/tests/system/xfer/tests_sh_xfer.py @@ -9,6 +9,55 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "axfr.out", + "dig.out.*", + "stats.*", + "wait_for_message.*", + "ans*/ans.run", + "ns1/dot-fallback.db", + "ns1/edns-expire.db", + "ns1/ixfr-too-big.db", + "ns1/ixfr-too-big.db.jnl", + "ns1/ixfr-too-many-diffs.db.jnl", + "ns1/sec.db", + "ns2/dot-fallback.db", + "ns2/example.db", + "ns2/example.db.jnl", + "ns2/mapped.db", + "ns2/sec.db", + "ns2/tsigzone.db", + "ns3/example.bk", + "ns3/example.bk.jnl", + "ns3/mapped.bk", + "ns3/primary.bk", + "ns3/primary.bk.jnl", + "ns3/tsigzone.bk", + "ns3/xfer-stats.bk", + "ns4/nil.db", + "ns4/root.db", + "ns6/axfr-max-idle-time.bk", + "ns6/axfr-max-transfer-time.bk", + "ns6/axfr-rndc-retransfer-force.bk", + "ns6/edns-expire.bk", + "ns6/ixfr-too-big.bk", + "ns6/ixfr-too-big.bk.jnl", + "ns6/ixfr-too-many-diffs.bk", + "ns6/primary.db", + "ns6/primary.db.jnl", + "ns6/sec.bk", + "ns7/edns-expire.bk", + "ns7/primary2.db", + "ns7/sec.bk", + "ns7/sec.bk.jnl", + "ns8/large.db", + "ns8/small.db", + ] +) + def test_xfer(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/xferquota/clean.sh b/bin/tests/system/xferquota/clean.sh deleted file mode 100644 index d3f3cf8a74..0000000000 --- a/bin/tests/system/xferquota/clean.sh +++ /dev/null @@ -1,25 +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. - -# -# Clean up after zone transfer quota tests. -# - -rm -f ns1/zone*.example.db ns1/zones.conf -rm -f ns2/zone*.example.bk ns2/zones.conf -rm -f dig.out.* ns2/changing.bk -rm -f ns1/changing.db -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/xferquota/tests_xferquota.py b/bin/tests/system/xferquota/tests_xferquota.py index 3b9572f1bd..06421640c4 100644 --- a/bin/tests/system/xferquota/tests_xferquota.py +++ b/bin/tests/system/xferquota/tests_xferquota.py @@ -15,9 +15,21 @@ import re import shutil import signal +import dns.message +import pytest + import isctest -import dns.message +pytestmark = pytest.mark.extra_artifacts( + [ + "ns1/changing.db", + "ns1/zone*.example.db", + "ns1/zones.conf", + "ns2/changing.bk", + "ns2/zone*.example.bk", + "ns2/zones.conf", + ] +) def test_xferquota(named_port, servers): diff --git a/bin/tests/system/zero/clean.sh b/bin/tests/system/zero/clean.sh deleted file mode 100644 index ab392ef545..0000000000 --- a/bin/tests/system/zero/clean.sh +++ /dev/null @@ -1,21 +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 */named.conf -rm -f */named.run -rm -f */named.memstats -rm -f ns2/example.db -rm -f ns4/example.bk -rm -f dig.out* -rm -f query.list -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/zero/tests_sh_zero.py b/bin/tests/system/zero/tests_sh_zero.py index 0e8ceb2626..3191f1c62a 100644 --- a/bin/tests/system/zero/tests_sh_zero.py +++ b/bin/tests/system/zero/tests_sh_zero.py @@ -9,6 +9,18 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "dig.out*", + "query.list", + "ans*/ans.run", + "ns2/example.db", + "ns4/example.bk", + ] +) + def test_zero(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/zonechecks/clean.sh b/bin/tests/system/zonechecks/clean.sh deleted file mode 100644 index 07a59397cd..0000000000 --- a/bin/tests/system/zonechecks/clean.sh +++ /dev/null @@ -1,21 +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 *.out -rm -f */named.memstats -rm -f */named.conf -rm -f */named.run -rm -f */*.db */*.db.signed */K*.key */K*.private */K*.state */*.jnl */dsset-* -rm -f */signer.err -rm -f rndc.out.* -rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/zonechecks/tests_sh_zonechecks.py b/bin/tests/system/zonechecks/tests_sh_zonechecks.py index 28a7bb1c95..9b64d839a1 100644 --- a/bin/tests/system/zonechecks/tests_sh_zonechecks.py +++ b/bin/tests/system/zonechecks/tests_sh_zonechecks.py @@ -9,6 +9,25 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +import pytest + +pytestmark = pytest.mark.extra_artifacts( + [ + "*.out", + "rndc.out.*", + "ns1/K*", + "ns1/bigserial.db", + "ns1/dsset-primary.example.", + "ns1/duplicate.db", + "ns1/primary.db", + "ns1/primary.db.signed", + "ns1/reload.db", + "ns1/signer.err", + "ns1/soa.db", + "ns2/sec.db", + ] +) + def test_zonechecks(run_tests_sh): run_tests_sh()