Re: [TCK] [PATCH v2] Test cases for network ipv6 support

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

 



On 01/04/2011 06:44 PM, Stefan Berger wrote:
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.


I don't really feel qualified to do a good review of patches for libvirt-tck, but since you've taken the time to add in tests for code that I wrote, I felt it my responsibility to respond :-)

First - Thanks for adding this in!

Looks like I need to be careful where I run the libvirt-tck, as one of the networks chosen for testing will clobber the route to an important internal network (10.0.0.0/8) for the duration of the test.

Aside from that, and the indenting issue I mention below, it looks like these tests follow the pattern of previous network tests you've already committed, and they seem to be looking at the right things (although they seem a bit fragile - any change to the way we invoke radvd or dnsmasq will cause the test to fail, right?), so I would give a conditional ACK (after fixing the indentation) just because more testing is better than less, if for no other reason :-)


Signed-off-by: Stefan Berger<stefanb@xxxxxxxxxx>


---
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>
+

It might look nicer for this XML to be indented.

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]