netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] tests: py: flush log file output before running each command
@ 2020-09-14 20:08 Pablo Neira Ayuso
  2020-09-14 20:08 ` [PATCH nft 1/2] evaluate: remove one indent level in __expr_evaluate_payload() Pablo Neira Ayuso
  2020-09-14 20:08 ` [PATCH nft 2/2] src: context tracking for multiple transport protocols Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2020-09-14 20:08 UTC (permalink / raw)
  To: netfilter-devel

If nft crashes or hits an assertion, the last command run shows in the
/tmp/nftables-test.log file.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 tests/py/nft-test.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index df97ed8eefb7..e7b5e01efcb9 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -1022,6 +1022,8 @@ def execute_cmd(cmd, filename, lineno, stdout_log=False, debug=False):
     if debug_option:
         print(cmd)
 
+    log_file.flush()
+
     if debug:
         debug_old = nftables.get_debug()
         nftables.set_debug(debug)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-14 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-14 20:08 [PATCH nft] tests: py: flush log file output before running each command Pablo Neira Ayuso
2020-09-14 20:08 ` [PATCH nft 1/2] evaluate: remove one indent level in __expr_evaluate_payload() Pablo Neira Ayuso
2020-09-14 20:08 ` [PATCH nft 2/2] src: context tracking for multiple transport protocols Pablo Neira Ayuso

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).