[LTP] [PATCH v2 2/2] network/iptables: add new test for iptables-tranlsate and nft
Alexey Kodanev
alexey.kodanev@oracle.com
Wed Dec 18 15:46:30 CET 2019
On 18.12.2019 11:44, Petr Vorel wrote:
> Hi Alexey,
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> one more fix below.
>
...
>> +. 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).
Thanks Petr! Fixed them and applied the patches.
More information about the ltp
mailing list