[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [TCK] [PATCH v2] Test cases for network ipv6 support



v2:
  - added test cases using 'ip addr ...' and 'ip route ...' commands

This patch adds a couple of test cases for the recently added network ipv6 support.

Signed-off-by: Stefan Berger<stefanb us ibm com>


---
 scripts/networks/networkxml2hostout/tck-testnet-3.dat      |   39 +++++++++++++
 scripts/networks/networkxml2hostout/tck-testnet-3.post.dat |   14 ++++
 scripts/networks/networkxml2xmlin/tck-testnet-3.xml        |   22 +++++++
 3 files changed, 75 insertions(+)

Index: libvirt-tck/scripts/networks/networkxml2xmlin/tck-testnet-3.xml
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2xmlin/tck-testnet-3.xml
@@ -0,0 +1,22 @@
+<network>
+<name>tck-testnet</name>
+<uuid>aadc8920-502a-4774-ac2b-cd382a204d06</uuid>
+<bridge name="tck-testbr" />
+<forward mode="nat" />
+<ip address="10.1.2.1" netmask="255.255.255.0">
+<dhcp>
+<range start="10.1.2.2" end="10.1.2.254" />
+<host mac="00:16:3e:77:e2:ed" name="a.example.com" ip="10.1.2.10" />
+<host mac="00:16:3e:3e:a9:1a" name="b.example.com" ip="10.1.2.11" />
+</dhcp>
+</ip>
+<ip family="ipv4" address="192.168.123.1" netmask="255.255.255.0">
+</ip>
+<ip family="ipv6" address="2001:db8:ac10:fe01::1" prefix="64">
+</ip>
+<ip family="ipv6" address="2001:db8:ac10:fd01::1" prefix="64">
+</ip>
+<ip family="ipv4" address="10.24.10.1">
+</ip>
+</network>
+
Index: libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-3.dat
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-3.dat
@@ -0,0 +1,39 @@
+#iptables -t nat -L -n | grep ' 10\.1\.2\.'
+MASQUERADE  tcp  --  10.1.2.0/24         !10.1.2.0/24         masq ports: 1024-65535
+MASQUERADE  udp  --  10.1.2.0/24         !10.1.2.0/24         masq ports: 1024-65535
+MASQUERADE  all  --  10.1.2.0/24         !10.1.2.0/24
+#iptables -n -L FORWARD | grep ' 10\.1\.2\.'
+ACCEPT     all  --  0.0.0.0/0            10.1.2.0/24         state RELATED,ESTABLISHED
+ACCEPT     all  --  10.1.2.0/24          0.0.0.0/0
+#ip6tables -n -L FORWARD | grep ' 2001:db8:ac10'
+ACCEPT     all      ::/0                 2001:db8:ac10:fd01::/64
+ACCEPT     all      2001:db8:ac10:fd01::/64  ::/0
+ACCEPT     all      ::/0                 2001:db8:ac10:fe01::/64
+ACCEPT     all      2001:db8:ac10:fe01::/64  ::/0
+#ps aux | sed -n '/dnsmasq .*10\.1\.2\./ s|.*\(dnsmasq [[:print:]*]\)|\1|p'
+dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/tck-testnet.pid --conf-file=  --listen-address 10.1.2.1 --except-interface lo --dhcp-range 10.1.2.2,10.1.2.254 --dhcp-lease-max=253 --dhcp-no-override
+#ps aux | sed -n '/radvd --.*tck\-testnet\-/ s|.*\(radvd [[:print:]*]\)|\1|p'
+radvd --debug 1 --config /var/lib/libvirt/radvd/tck-testnet-radvd.conf --pidfile /var/run/libvirt/network/tck-testnet-radvd.pid-bin
+#route -n | grep '10\.1\.2\.'
+10.1.2.0        0.0.0.0         255.255.255.0   U     0      0        0 tck-testbr
+#route -n | grep '192\.168\.123\.'
+192.168.123.0   0.0.0.0         255.255.255.0   U     0      0        0 tck-testbr
+#route -n | grep '10\.0\.0\.0'
+10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 tck-testbr
+#brctl show | grep tck-testbr
+tck-testbr		8000.000000000000	yes		
+#ifconfig tck-testbr | grep ':10\.1\.2\.'
+          inet addr:10.1.2.1  Bcast:10.1.2.255  Mask:255.255.255.0
+#ifconfig tck-testbr | grep 'inet6 addr: 2001'
+          inet6 addr: 2001:db8:ac10:fd01::1/64 Scope:Global
+          inet6 addr: 2001:db8:ac10:fe01::1/64 Scope:Global
+#ip addr show tck-testbr | grep "inet "
+    inet 10.1.2.1/24 brd 10.1.2.255 scope global tck-testbr
+    inet 192.168.123.1/24 brd 192.168.123.255 scope global tck-testbr
+    inet 10.24.10.1/8 brd 10.255.255.255 scope global tck-testbr
+#ip route show dev tck-testbr
+10.1.2.0/24  proto kernel  scope link  src 10.1.2.1
+192.168.123.0/24  proto kernel  scope link  src 192.168.123.1
+10.0.0.0/8  proto kernel  scope link  src 10.24.10.1
+#virsh net-list | grep tck-testnet
+tck-testnet          active     no
Index: libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-3.post.dat
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-3.post.dat
@@ -0,0 +1,14 @@
+#iptables -t nat -L -n | grep ' 10\.1\.2\.'
+#iptables -n -L FORWARD | grep ' 10\.1\.2\.'
+#ip6tables -n -L FORWARD | grep ' 2001:db8:ac10'
+#ps aux | sed -n '/dnsmasq .*10\.1\.2\./ s|.*\(dnsmasq [[:print:]*]\)|\1|p'
+#ps aux | sed -n '/radvd --.*tck\-testnet\-/ s|.*\(radvd [[:print:]*]\)|\1|p'
+#route -n | grep '10\.1\.2\.'
+#route -n | grep '192\.168\.123\.'
+#route -n | grep '10\.0\.0\.0'
+#brctl show | grep tck-testbr
+#ifconfig tck-testbr 2>/dev/null | grep ':10\.1\.2\.'
+#ifconfig tck-testbr 2>/dev/null | grep 'inet6 addr: 2001'
+#ip addr show tck-testbr 2>/dev/null | grep "inet "
+#ip route show dev tck-testbr 2>/dev/null
+#virsh net-list | grep tck-testnet


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]