From: Phil Sutter Date: Fri, 13 Apr 2018 14:52:31 +0000 (+0200) Subject: tests/py: Fix differences printing for rules with sets X-Git-Tag: v0.8.4~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f481851b0dbaeb76ecc5c355e4a9cc8c5da71956;p=thirdparty%2Fnftables.git tests/py: Fix differences printing for rules with sets If a rule contained a set, it would always print the tested rule as differing from the output instead of any given output (if defined). Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py index d5cb25b3..d4b22817 100755 --- a/tests/py/nft-test.py +++ b/tests/py/nft-test.py @@ -737,8 +737,8 @@ def rule_add(rule, filename, lineno, force_all_family_option, filename_path): if set_check_element(teoric_exit.rstrip(), rule_output.rstrip()) != 0: warning += 1 print_differences_warning(filename, lineno, - rule[0], rule_output, - cmd) + teoric_exit.rstrip(), + rule_output, cmd) if not force_all_family_option: return [ret, warning, error, unit_tests] else: