[iptables PATCH 1/5] tests: iptables-test: Append stderr output to log file

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

 



Right now this merely contains a number of intrapositioned negation
warnings, but might be useful in future when debugging unexpected
failures.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 iptables-test.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/iptables-test.py b/iptables-test.py
index cefe42335d25d..77278925d7217 100755
--- a/iptables-test.py
+++ b/iptables-test.py
@@ -132,6 +132,8 @@ STDERR_IS_TTY = sys.stderr.isatty()
                             stdin=subprocess.PIPE,
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     out, err = proc.communicate()
+    if len(err):
+        print(err, file=log_file)
 
     #
     # check for segfaults
@@ -333,6 +335,8 @@ STDERR_IS_TTY = sys.stderr.isatty()
                             stderr = subprocess.PIPE)
     restore_data = "\n".join(restore_data) + "\n"
     out, err = proc.communicate(input = restore_data)
+    if len(err):
+        print(err, file=log_file)
 
     if proc.returncode == -11:
         reason = iptables + "-restore segfaults!"
@@ -358,6 +362,8 @@ STDERR_IS_TTY = sys.stderr.isatty()
                             stdout = subprocess.PIPE,
                             stderr = subprocess.PIPE)
     out, err = proc.communicate()
+    if len(err):
+        print(err, file=log_file)
 
     if proc.returncode == -11:
         reason = iptables + "-save segfaults!"
-- 
2.43.0





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux