...
 
Commits (2)
  • Laine Stump's avatar
    scripts: shorten netdev/domain name to prevent overflow · db9c604f
    Laine Stump authored
    When new pids are more than 9 digits long
    
    The nwfilter tests use tck-test${pid} as the auto-generated name for
    their test domains (and therefore the tap devices created for those
    test domains). When the pid is > 9 digits long, the total length of
    the name is > 16, which is the maximum length for any network device
    name (IFNAMSIZ), and this causes failure to create the tap device,
    thus failure of the test:
    
      /home/laine/devel/libvirt-tck/scripts/nwfilter/050-apply-verify-host.t ..
      error: Failed to start domain tck-test10513851
      error: Network interface name 'tck-test10513851' is too long:
             Numerical result out of range
    
    The solution is to just remove "test" from the name template, so pid
    can be up to 12 digits long before the test fails.
    
    Signed-off-by: Laine Stump <laine@laine.org
    Reviewed-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
    db9c604f
  • Laine Stump's avatar
    network tests: change network address to avoid commonly-used subnet · 3ecb368e
    Laine Stump authored
    My own machine has a virtual network on 192.168.123.0/24, and I've
    been told that it's a common selection for people who create a second
    network after libvirt's default (and in the past was used as a manual
    alternative for the default network itself when 192.168.122.0/24
    casued a conflict). Changing to 192.168.97.0/24 also isn't foolproof,
    but it's much less likely to encounter a conflict leading to a failed
    test.
    
    Signed-off-by: Laine Stump <laine@laine.org
    Reviewed-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
    3ecb368e
......@@ -24,13 +24,13 @@ dhcp-range=2001:db8:ac10:fd01::1,ra-only
tck-testbr yes
#ip -o addr show dev tck-testbr | gawk '{print $4" "$6}' | grep -v link
10.1.2.1/24 10.1.2.255
192.168.123.1/24 192.168.123.255
192.168.97.1/24 192.168.97.255
172.28.255.241/28 172.28.255.255
2001:db8:ac10:fd01::1/64 global
2001:db8:ac10:fe01::1/64 global
#ip -o route show dev tck-testbr | gawk '{print $1" "$7}'
10.1.2.0/24 10.1.2.1
172.28.255.240/28 172.28.255.241
192.168.123.0/24 192.168.123.1
192.168.97.0/24 192.168.97.1
#virsh net-list | grep tck-testnet
tck-testnet active no no
......@@ -2,14 +2,14 @@
#iptables -n -L FORWARD | grep ' 10\.1\.2\.'
#ip6tables -n -L FORWARD | grep ' 2001:db8:ac10'
#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(listen-address 10\.1\.2\.1\).*|\1|p'
#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(listen-address 192\.168\.123\.1\).*|\1|p'
#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(listen-address 192\.168\.97\.1\).*|\1|p'
#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(listen-address 172\.28\.255\.241\).*|\1|p'
#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(dhcp-range 10\.1\.2\.2,10\.1\.2\.254\).*|\1|p'
#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(listen-address 2001\:db8\:ac10\:fe01\:\:1\).*|\1|p'
#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(listen-address 2001\:db8\:ac10\:fd01\:\:1\).*|\1|p'
#ps aux | sed -n '/radvd --.*tck-testnet-/ s|.*\(\/radvd\/tck-testnet-radvd.conf\).*|\1|p'
#route -n | grep '10\.1\.2\.'
#route -n | grep '192\.168\.123\.'
#route -n | grep '192\.168\.97\.'
#route -n | grep '172\.28\.255\.240'
#brctl show | grep tck-testbr
#ifconfig tck-testbr 2>/dev/null | grep ':10\.1\.2\.'
......
......@@ -10,7 +10,7 @@
<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 family="ipv4" address="192.168.97.1" netmask="255.255.255.0">
</ip>
<ip family="ipv6" address="2001:db8:ac10:fe01::1" prefix="64">
</ip>
......
......@@ -638,8 +638,8 @@ main() {
cd "${curdir}" || { echo "cd failed" >&2; exit 1; }
fi
vm1="tck-test$$1"
vm2="tck-test$$2"
vm1="tck-$$1"
vm2="tck-$$2"
createTestFilters "${flags}"
if [ $? -ne 0 ]; then
......