From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 2/2] network/iptables: add new test for iptables-tranlsate and nft
Date: Wed, 18 Dec 2019 09:44:06 +0100 [thread overview]
Message-ID: <20191218084406.GA10966@dell5510> (raw)
In-Reply-To: <20191217171918.10237-2-alexey.kodanev@oracle.com>
Hi Alexey,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
one more fix below.
> +++ b/testcases/network/iptables/nft01.sh
> @@ -0,0 +1,41 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (c) 2019 Oracle and/or its affiliates. All Rights Reserved.
> +
> +TST_CNT=6
> +TST_SETUP="do_setup"
> +TST_TESTFUNC="test"
> +TST_CLEANUP="do_cleanup"
> +TST_NEEDS_TMPDIR=1
> +TST_NEEDS_ROOT=1
> +TST_NEEDS_CMDS="nft iptables-translate grep ping telnet"
> +TST_NEEDS_DRIVERS="nf_tables"
> +use_iptables=0
> +
> +. iptables_lib.sh
> +. tst_test.sh
> +
> +cleanup_tables=0
cleanup_table=0
Otherwise it fails:
nft01 1 TCONF: 'nft' not found
/opt/ltp/testcases/bin/nft01.sh: line 37: [: -eq: unary operator expected
+ nit (code style comments, feel free to ignore):
1) I'd use empty variable instead of 0 (and [ "$cleanup_chain" = 1 ]),
we discuss it with previous patches.
2) I'd move TST_CNT=6 to iptables_lib.sh (if test function adds more tests, all
iptables_lib.sh uses would have to update it). Maybe all but these could be
there: TST_SETUP, TST_CLEANUP and use_iptables.
3) I'd move cleanup_table and cleanup_chain below use_iptables
(or use_iptables below, just to have all 3 variables together).
Kind regards,
Petr
next prev parent reply other threads:[~2019-12-18 8:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 17:19 [LTP] [PATCH v2 1/2] network/iptables: reduce ping timeouts Alexey Kodanev
2019-12-17 17:19 ` [LTP] [PATCH v2 2/2] network/iptables: add new test for iptables-tranlsate and nft Alexey Kodanev
2019-12-18 8:44 ` Petr Vorel [this message]
2019-12-18 14:46 ` Alexey Kodanev
2019-12-18 15:28 ` Petr Vorel
2019-12-18 15:53 ` Alexey Kodanev
2019-12-19 7:08 ` Petr Vorel
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=20191218084406.GA10966@dell5510 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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