summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-05-08 14:57:36 +0200
committerPhil Sutter <phil@nwl.cc>2020-05-11 16:51:15 +0200
commit1a98eb30fe156600b8db9300ad7482e32d5b3791 (patch)
treeecdcc0eec58ead5519d2f677db580d212fd8ba81 /extensions
parentd4409d449c10faa3917a9c9624ba90ac881f89d1 (diff)
iptables-test: Don't choke on empty lines
The script code wasn't expecting empty lines: | Traceback (most recent call last): | File "./iptables-test.py", line 380, in <module> | main() | File "./iptables-test.py", line 370, in main | file_tests, file_passed = run_test_file(filename, args.netns) | File "./iptables-test.py", line 265, in run_test_file | if item[1] == "=": | IndexError: list index out of range Fix this by ignoring empty lines or those consisting of whitespace only. While being at it, remove the empty line from libxt_IDLETIMER.t which exposed the problem. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libxt_IDLETIMER.t1
1 files changed, 0 insertions, 1 deletions
diff --git a/extensions/libxt_IDLETIMER.t b/extensions/libxt_IDLETIMER.t
index d13b119e..e8f306d2 100644
--- a/extensions/libxt_IDLETIMER.t
+++ b/extensions/libxt_IDLETIMER.t
@@ -3,4 +3,3 @@
-j IDLETIMER --timeout 42;;FAIL
-j IDLETIMER --timeout 42 --label foo;=;OK
-j IDLETIMER --timeout 42 --label foo --alarm;;OK
-