From mboxrd@z Thu Jan 1 00:00:00 1970 From: pradeep Subject: Re: [Autotest] [AUTOTEST] [PATCH 1/2] KVM : ping6 test Date: Thu, 14 Oct 2010 16:15:32 +0530 Message-ID: <20101014161532.7f75a363@skywalker> References: <1287030252-3291-1-git-send-email-lmr@redhat.com> <20101014145659.41e45b35@skywalker> <20101014100504.GA8065@z> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, kvm@vger.kernel.org To: Amos Kong Return-path: Received: from e38.co.us.ibm.com ([32.97.110.159]:59136 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750976Ab0JNKpw (ORCPT ); Thu, 14 Oct 2010 06:45:52 -0400 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e38.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o9EAbnpC005504 for ; Thu, 14 Oct 2010 04:37:49 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9EAjgGU155090 for ; Thu, 14 Oct 2010 04:45:42 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9EAjfdr012974 for ; Thu, 14 Oct 2010 04:45:41 -0600 In-Reply-To: <20101014100504.GA8065@z> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 14 Oct 2010 18:05:04 +0800 Amos Kong wrote: > On Thu, Oct 14, 2010 at 02:56:59PM +0530, pradeep wrote: > > This patch is for Ping6 testing > > > > * ping6 with various message sizes guest to/from local/remote > > host using link-local addresses > > By default IPv6 seems to be disabled on virbr0. Enable it by > > doing echo 0 > /proc/sys/net/ipv6/conf/virbr0/disable_ipv6 > > > > Please find the below attached patch > > We also need update related code in kvm_test_utils.py, and consider > the difference of 'ping' and 'ping6'. ping6 test again calls same ping, and enables ipv6. so we dont need to make any changes in kvm_test_utils.py for ping6. > > > 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" > > We may use other bridge, so 'virbr0', need replace this hardcode name. > We can reference to > 'autotest-upstream/client/tests/kvm/scripts/qemu-ifup' > switch=$(/usr/sbin/brctl show | awk 'NR==2 { print $1 }') > > > > + > > 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() > > --- > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest