3
# Copyright (C) International Business Machines Corp., 2005
4
# Author: <dykman@us.ibm.com>
6
# Ping tests to dom0 interface
7
# - determines dom0 network
8
# - creates a single guest domain
9
# - sets up a single NIC on same subnet as dom0
10
# - conducts ping tests to the dom0 IP address.
12
# ping -c 1 -s $size $dom0_IP
13
# where $size = 1, 48, 64, 512, 1440, 1500, 1505,
14
# 4096, 4192, 32767, 65507, 65508
16
pingsizes = [ 1, 48, 64, 512, 1440, 1500, 1505, 4096, 4192,
19
from XmTestLib import *
22
# Test creates 1 domain, which requires 2 ips: 1 for the domains and 1 for
24
if xmtest_netconf.canRunNetTest(2) == False:
25
SKIP("Don't have enough free configured IPs to run this test")
27
# Fire up a guest domain w/1 nic
28
domain = XmTestDomain()
29
domain.newDevice(XenNetDevice, "eth0")
32
console = domain.start()
33
except DomainError, e:
35
print "Failed to create test domain because:"
42
netdev = domain.getDevice("eth0")
43
dom0ip = netdev.getDom0AliasIP()
44
for size in pingsizes:
45
out = console.runCmd("ping -q -c 1 -s " + str(size) + " " + dom0ip)
47
fails += " " + str(size)
48
except ConsoleError, e:
54
FAIL("Ping to dom0 failed for size" + fails + ".")