[1/1] network/vxlan02.sh: Fix duplicate parameters

Message ID 20180416221141.2781-1-pvorel@suse.cz
State Accepted
Delegated to: Alexey Kodanev
Headers show
Series
  • [1/1] network/vxlan02.sh: Fix duplicate parameters
Related show

Commit Message

Petr Vorel April 16, 2018, 10:11 p.m.
vxlan02 and vxlan02_ipv6 tests had duplicate parameters 'dev ltp_ns_veth2':
ip li add ltp_v0 type vxlan dstport 0 id 16700000 group 239.1.1.1 dev ltp_ns_veth2 dev ltp_ns_veth2
Error: either "dev" is duplicate, or "ltp_ns_veth2" is a garbage.

Device was specified in in both the test file itself and in virt_add() function in virt_lib.sh.
Removed in test to be consistent with vlan02.sh.

Fixes: 8e5862c20 ("net: vxlan02: specify interface when adding multicast dst")

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/network/virt/vxlan02.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexey Kodanev April 17, 2018, 9:48 a.m. | #1
On 04/17/2018 01:11 AM, Petr Vorel wrote:
> vxlan02 and vxlan02_ipv6 tests had duplicate parameters 'dev ltp_ns_veth2':
> ip li add ltp_v0 type vxlan dstport 0 id 16700000 group 239.1.1.1 dev ltp_ns_veth2 dev ltp_ns_veth2
> Error: either "dev" is duplicate, or "ltp_ns_veth2" is a garbage.
> 
> Device was specified in in both the test file itself and in virt_add() function in virt_lib.sh.
> Removed in test to be consistent with vlan02.sh.
> 
> Fixes: 8e5862c20 ("net: vxlan02: specify interface when adding multicast dst")
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Acked-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Alexey Kodanev April 17, 2018, 11:34 a.m. | #2
On 04/17/2018 12:48 PM, Alexey Kodanev wrote:
> On 04/17/2018 01:11 AM, Petr Vorel wrote:
>> vxlan02 and vxlan02_ipv6 tests had duplicate parameters 'dev ltp_ns_veth2':
>> ip li add ltp_v0 type vxlan dstport 0 id 16700000 group 239.1.1.1 dev ltp_ns_veth2 dev ltp_ns_veth2
>> Error: either "dev" is duplicate, or "ltp_ns_veth2" is a garbage.
>>
>> Device was specified in in both the test file itself and in virt_add() function in virt_lib.sh.
>> Removed in test to be consistent with vlan02.sh.
>>

Hi Petr,

Not related to the patch, also noted that now vxlan03.sh tests
have some errors when parsing the args. Not sure if it has any
effect on the test itself...

vxlan03.sh -d uni
/opt/ltp/testcases/bin/vxlan03.sh: illegal option -- d
/opt/ltp/testcases/bin/tst_net.sh: line 37: ?: command not found


Thanks,
Alexey
Petr Vorel April 17, 2018, 6:48 p.m. | #3
Hi Alexey,
> Hi Petr,

> Not related to the patch, also noted that now vxlan03.sh tests
> have some errors when parsing the args. Not sure if it has any
> effect on the test itself...

> vxlan03.sh -d uni
> /opt/ltp/testcases/bin/vxlan03.sh: illegal option -- d
> /opt/ltp/testcases/bin/tst_net.sh: line 37: ?: command not found

Thanks for report, fixed in
06ee2b027 network/vxlan03: Fix getopts parameters passed to virt_lib.sh

> Thanks,
> Alexey

Kind regards,
Petr
Petr Vorel April 17, 2018, 6:54 p.m. | #4
Hi Alexey,

> On 04/17/2018 01:11 AM, Petr Vorel wrote:
> > vxlan02 and vxlan02_ipv6 tests had duplicate parameters 'dev ltp_ns_veth2':
> > ip li add ltp_v0 type vxlan dstport 0 id 16700000 group 239.1.1.1 dev ltp_ns_veth2 dev ltp_ns_veth2
> > Error: either "dev" is duplicate, or "ltp_ns_veth2" is a garbage.

> > Device was specified in in both the test file itself and in virt_add() function in virt_lib.sh.
> > Removed in test to be consistent with vlan02.sh.

> > Fixes: 8e5862c20 ("net: vxlan02: specify interface when adding multicast dst")

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>

> Acked-by: Alexey Kodanev <alexey.kodanev@oracle.com>

Thanks a lot for review, merged!


Kind regards,
Petr
Alexey Kodanev April 19, 2018, 1:08 p.m. | #5
On 04/17/2018 09:48 PM, Petr Vorel wrote:
...

>> Not related to the patch, also noted that now vxlan03.sh tests
>> have some errors when parsing the args. Not sure if it has any
>> effect on the test itself...
> 
>> vxlan03.sh -d uni
>> /opt/ltp/testcases/bin/vxlan03.sh: illegal option -- d
>> /opt/ltp/testcases/bin/tst_net.sh: line 37: ?: command not found
> 
> Thanks for report, fixed in
> 06ee2b027 network/vxlan03: Fix getopts parameters passed to virt_lib.sh

With this patch vxlan03 ignores the '-6' option.

And tst_net.sh sourced two times there, in virt_lib.sh and in vxlan03.sh.

Patch

diff --git a/testcases/network/virt/vxlan02.sh b/testcases/network/virt/vxlan02.sh
index 07cf656d7..db152afdf 100755
--- a/testcases/network/virt/vxlan02.sh
+++ b/testcases/network/virt/vxlan02.sh
@@ -33,6 +33,6 @@  TST_USE_LEGACY_API=1
 [ "$TST_IPV6" ] && mult_addr="ff02::abc" || mult_addr="239.1.1.1"
 opt="group $mult_addr"
 
-virt_add_delete_test "id $start_id $opt dev $(tst_iface)"
+virt_add_delete_test "id $start_id $opt"
 
 tst_exit