netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Subject: [iptables PATCH 1/5] tests: iptables-test: Append stderr output to log file
Date: Wed,  9 Oct 2024 12:50:33 +0200	[thread overview]
Message-ID: <20241009105037.30114-2-phil@nwl.cc> (raw)
In-Reply-To: <20241009105037.30114-1-phil@nwl.cc>

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@nwl.cc>
---
 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


  reply	other threads:[~2024-10-09 10:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 10:50 [iptables PATCH 0/5] Some minor fixes Phil Sutter
2024-10-09 10:50 ` Phil Sutter [this message]
2024-10-09 10:50 ` [iptables PATCH 2/5] man: xtables-legacy.8: Join two paragraphs Phil Sutter
2024-10-09 10:50 ` [iptables PATCH 3/5] man: ebtables-nft.8: Note that --concurrent is a NOP Phil Sutter
2024-10-09 10:50 ` [iptables PATCH 4/5] gitignore: Ignore generated arptables-translate.8 Phil Sutter
2024-10-09 10:50 ` [iptables PATCH 5/5] xshared: iptables does not support '-b' Phil Sutter
2024-10-16 13:33 ` [iptables PATCH 0/5] Some minor fixes Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241009105037.30114-2-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).