From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [nft PATCH v2 4/5] tests: py: Warn if recorded JSON output matches the input
Date: Fri, 22 Mar 2024 17:06:44 +0100 [thread overview]
Message-ID: <20240322160645.18331-5-phil@nwl.cc> (raw)
In-Reply-To: <20240322160645.18331-1-phil@nwl.cc>
Actively support spring-cleaning by nagging callers.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
tests/py/nft-test.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index a7d27c25f9fe0..1bc8955836d0d 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -809,6 +809,8 @@ def set_delete_elements(set_element, set_name, table, filename=None,
reason = "Invalid JSON syntax in expected output: %s" % json_expected
print_error(reason)
return [-1, warning, error, unit_tests]
+ if json_expected == json_input:
+ print_warning("Recorded JSON output matches input for: %s" % rule[0])
for table in table_list:
if rule[1].strip() == "ok":
--
2.43.0
next prev parent reply other threads:[~2024-03-22 16:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 16:06 [nft PATCH v2 0/5] json: Accept more than two operands in binary expressions Phil Sutter
2024-03-22 16:06 ` [nft PATCH v2 1/5] " Phil Sutter
2024-03-22 16:06 ` [nft PATCH v2 2/5] mergesort: Avoid accidental set element reordering Phil Sutter
2024-03-22 16:06 ` [nft PATCH v2 3/5] tests: py: Fix some JSON equivalents Phil Sutter
2024-03-22 16:06 ` Phil Sutter [this message]
2024-03-22 16:06 ` [nft PATCH v2 5/5] tests: py: Drop needless recorded JSON outputs Phil Sutter
2024-04-12 12:35 ` [nft PATCH v2 0/5] json: Accept more than two operands in binary expressions Phil Sutter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240322160645.18331-5-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox