]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: regression: Delete an unnecessary whitespace in an output messages
authorAna Rey <anarey@gmail.com>
Wed, 8 Oct 2014 12:52:10 +0000 (14:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 9 Oct 2014 16:54:50 +0000 (18:54 +0200)
If the script is run with the -e option, the output messages show an
unnecessary white-space. This path fixes this mistake.

sudo ./nft-test.py -e
[...] "line 34: nft add rule -nnn arp test-arp  input arp plen != {33-55} " [...]
                                             ^^^^

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/regression/nft-test.py

index d4929f083f34f3d93dc52f11c33dcb347e1bfa20..00c33f3e18d536f812bcb39605f24d56e1504f27 100755 (executable)
@@ -694,7 +694,7 @@ def run_test_file(filename, force_all_family_option, specific_file):
             if line[1:].find("*") != -1:
                 continue
             if need_fix_option:
-                rule[0] = rule[0].rstrip()[1:]
+                rule[0] = rule[0].rstrip()[1:].strip()
                 result = rule_add(rule, table_list, chain_list, filename,
                                   lineno, force_all_family_option)
                 tests += 1