From nobody Sat Feb 5 10:07:22 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4DA26198C671; Sat, 5 Feb 2022 10:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JrSkf6Cpdz4j0Z; Sat, 5 Feb 2022 10:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644055643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yjPkIEthp88QTOhmpOXnOWeib1yqNh5zUe2TMCZd7P4=; b=IfANdtgFokCo58rVzEZMkEvgEhKyLvbw4/fP3xUJSus1wo98DC0TWa8nSav7W2td6Jaoiy 1MllrFaWlNnhwc8XO0bm4IbGp1hlRchH5GO51pxMjddN5fqxWxoNCiHybVuVd/diCSMNb1 OhlYHXo4+cUKR55hLAgyALOmURKM7LP7d4D3aNmPfvXhQjuiViL3H4uKp0TR2inFAytcGZ OgNJCJ9nGZjGvNBF4ZKyWvJJsQvECWf7sJKrYeEAOs0oRrcVMDoIMrehPQtGdNooNAUJ+S J7nAHMNU10r2ubLT43vaxDqU1vEYcDSTWcK0RAvhqmLibtO3gMrncGNOBx63Gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E0011D23F; Sat, 5 Feb 2022 10:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 215A7MTi032921; Sat, 5 Feb 2022 10:07:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 215A7MbP032920; Sat, 5 Feb 2022 10:07:22 GMT (envelope-from git) Date: Sat, 5 Feb 2022 10:07:22 GMT Message-Id: <202202051007.215A7MbP032920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 34478b73bf18 - main - pf tests: Only do post-test logging when specifically enabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34478b73bf18e4f13b6053f6f338c78f782a1df8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644055643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yjPkIEthp88QTOhmpOXnOWeib1yqNh5zUe2TMCZd7P4=; b=jLGQ9qGLZ8X8iNoFINth0Z3ZuB0PXESosnMv3iqKRnXOhjNcv7Gc3JKwLTNzejW7bl0dkp FUanac48otGZUHhrlf7gPzTBMkXn4CQVJG6wp6NSz3mcxQOXSYtUipbkE5S1Xo/N2YpvBg oWtH3dQ+wI/0eAhqk5k3nuJKAwwltN758NG1M4NFW/rmGpSA5fEHTB+wPKDYAUuRItiadj tSMBwdfYhlMtuJQKtooeTrmoWmjtqTfi3+ArZKZ2howvMME3g2CGUX/YoBBLn3Yil/Krtc brY1vWVKcwmqbDKbmTdYQtnZDisdc7IcUMEND5ae7g71QEgD5OLtmYf9+K8l+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644055643; a=rsa-sha256; cv=none; b=LZs//ro0gXEtjQlrRiQU4AnkaXCjHT5asvnNsq5IAW/ROQn9dlHwPdJyWV5kKYvb/62aHo K33ZDJ2QDdGFhtwuBimfxHrhhw70i/nDQ4JNvXnlI43Rmkml8mjm13wHHkoghFt2HPJYrR 578ROjilEBd2nh3aljviAKJ3OE8YFg0IsFrrf5jgqY2UimEu4m27Ric5xrrxZ88OtTQrUP j7w8Ms7cK5vgdU4GyHV3C9La/6sowECO9NZTT0+hiX6ZIH8XZBCUrF3s/I/YGwFWrYOdml MJkdjhy4nOen8b24Z4NsO2fwkjIIh4X6R8zmqqOBiRiac5D+AT68Ms2a5N89tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=34478b73bf18e4f13b6053f6f338c78f782a1df8 commit 34478b73bf18e4f13b6053f6f338c78f782a1df8 Author: Kristof Provost AuthorDate: 2022-02-01 17:33:42 +0000 Commit: Kristof Provost CommitDate: 2022-02-05 09:31:51 +0000 pf tests: Only do post-test logging when specifically enabled The pf tests have the ability to log state information (pf rules, pf states, interfaces, ...) on exit (i.e. on success or on error). This is useful, but only in specific cases. When it's not needed it may get in the way of clear output. Test scripts can add 'debug' to the pft_init call to enable this for the specified test. Reviewed by: brd Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34133 --- tests/sys/netpfil/pf/utils.subr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/utils.subr b/tests/sys/netpfil/pf/utils.subr index 9afd6280707e..a010374993ff 100644 --- a/tests/sys/netpfil/pf/utils.subr +++ b/tests/sys/netpfil/pf/utils.subr @@ -59,7 +59,10 @@ pft_onerror() pft_init() { - trap pft_onerror EXIT + if [ "$1" == "debug" ] + then + trap pft_onerror EXIT + fi vnet_init