Signed-off-by: Pradeep K Surisetty --- --- autotest/client/tests/kvm/tests/ping.py 2010-10-14 14:20:52.523791118 +0530 +++ autotest_new/client/tests/kvm/tests/ping.py 2010-10-14 14:46:57.711797139 +0530 @@ -1,5 +1,6 @@ -import logging +import logging, time from autotest_lib.client.common_lib import error +from autotest_lib.client.bin import utils import kvm_test_utils @@ -27,10 +28,18 @@ def run_ping(test, params, env): nics = params.get("nics").split() strict_check = params.get("strict_check", "no") == "yes" + address_type = params.get("address_type") + #By default IPv6 seems to be disabled on virbr0. + ipv6_cmd = "echo %s > /proc/sys/net/ipv6/conf/virbr0/disable_ipv6" + packet_size = [0, 1, 4, 48, 512, 1440, 1500, 1505, 4054, 4055, 4096, 4192, 8878, 9000, 32767, 65507] try: + if address_type == "ipv6": + utils.run(ipv6_cmd % "0" ) + time.sleep(5) + for i, nic in enumerate(nics): ip = vm.get_address(i) if not ip: @@ -68,5 +77,9 @@ def run_ping(test, params, env): if status != 0: raise error.TestFail("Ping returns non-zero value %s" % output) + if address_type == "ipv6": + utils.run(ipv6_cmd % "1" ) + time.sleep(5) + finally: session.close() ---