[PATCH nft 3/5] tests: regression: fix "Listing is broken" instead of output mismatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the output string doesn't match the input, indicate that the output
mismatches instead of the misleading "Listing is broken".

Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 tests/regression/nft-test.py |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/tests/regression/nft-test.py b/tests/regression/nft-test.py
index e1aec89..9998ab3 100755
--- a/tests/regression/nft-test.py
+++ b/tests/regression/nft-test.py
@@ -505,15 +505,12 @@ def rule_add(rule, table_list, chain_list, filename, lineno,
                                                         rule_output, cmd)
                                 if not force_all_family_option:
                                     return [ret, warning, error, unit_tests]
-                            if rule[0].find(rule_output.split(" ")[0]) > -1:
-                                warning += 1
-                                print_differences_warning(filename, lineno,
-                                                          rule[0], rule_output,
-                                                          cmd)
-                            else:
-                                error += 1
-                                print_differences_error(filename, lineno,
-                                                        rule_output, cmd)
+
+                            warning += 1
+                            print_differences_warning(filename, lineno,
+                                                      rule[0], rule_output,
+                                                      cmd)
+
                             if not force_all_family_option:
                                 return [ret, warning, error, unit_tests]
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux