Modify sweep ping test cases
[csit.git] / tests / suites / ipv6 / ipv6_untagged.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 """IPv6 untagged test suite"""
15
16 *** Settings ***
17 | Documentation | IPv6 untagged test suite
18 | Library | resources.libraries.python.Trace
19 | Resource | resources/libraries/robot/interfaces.robot
20 | Resource | resources/libraries/robot/ipv6.robot
21 | Resource | resources/libraries/robot/counters.robot
22 | Resource | resources/libraries/robot/default.robot
23 | Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes}
24 | Force Tags | HW_ENV
25 | Suite Setup | Run Keywords | Setup ipv6 to all dut in topology | ${nodes} | ${nodes_ipv6_addr}
26 | ...         | AND          | Vpp nodes ra supress link layer | ${nodes}
27 | ...         | AND          | Vpp nodes setup ipv6 routing | ${nodes} | ${nodes_ipv6_addr}
28 | ...         | AND          | Setup all TGs before traffic script
29 | Test Setup | Clear interface counters on all vpp nodes in topology | ${nodes}
30 | Test Teardown | Run Keyword If Test Failed | Show packet trace on all DUTs | ${nodes}
31
32 *** Test Cases ***
33 | VPP replies to ICMPv6 echo request
34 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
35 | | Ipv6 icmp echo | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr}
36
37 | VPP can process ICMPv6 echo request from min to 1500B packet size with 1B increment
38 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
39 | | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1 | ${nodes_ipv6_addr}
40
41 | VPP can process ICMPv6 echo request from 1500B to max packet size with 10B increment
42 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
43 | | [Documentation] | This test case cannot be run reliably on VM_ENV because
44 | | ...             | the virtual hosts can be connected using a bridge which
45 | | ...             | has its own MTU
46 | | [Setup] | Setup MTU on TG based on MTU on DUT | ${nodes['TG']} | ${nodes['DUT1']}
47 | | [Teardown] | Set default Ethernet MTU on all interfaces on node | ${nodes['TG']}
48 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']}
49 | | Compute Path
50 | | ${dut_port} | ${dut_node}= | Last Interface
51 | | ${mtu}= | Get Interface MTU | ${dut_node} | ${dut_port}
52 | | # ICMPv6 payload size is frame size minus size of Ehternet header, FCS,
53 | | # IPv6 header and ICMPv6 header
54 | | ${end_size}= | Evaluate | ${mtu} - 14 - 4 - 40 - 8
55 | | Run Keyword If | ${mtu} > 1518
56 | | ...            | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']}
57 | | ...            | 1452 | ${end_size} | 10 | ${nodes_ipv6_addr}
58
59 | TG can route to first DUT egress interface
60 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
61 | | Ipv6 tg to dut1 egress | ${nodes['TG']} | ${nodes['DUT1']} |
62 | | ...                    | ${nodes['DUT2']} | ${nodes_ipv6_addr}
63
64 | TG can route to second DUT through first DUT
65 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
66 | | Ipv6 tg to dut2 via dut1 | ${nodes['TG']} | ${nodes['DUT1']}
67 | | ...                      | ${nodes['DUT2']} | ${nodes_ipv6_addr}
68
69 | TG can route to second DUT egress interface through first DUT
70 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
71 | | Ipv6 tg to dut2 egress via dut1 | ${nodes['TG']} | ${nodes['DUT1']}
72 | | ...                             | ${nodes['DUT2']} | ${nodes_ipv6_addr}
73
74 | TG can route to TG through first and second DUT
75 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
76 | | Ipv6 tg to tg routed | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
77 | | ...                  | ${nodes_ipv6_addr}
78
79 | VPP replies to IPv6 Neighbor Solicitation
80 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
81 | | Ipv6 neighbor solicitation | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr}