Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: client/virt/tests/vlan.py

Issue 6883246: Merge autotest upstream from @5318 ~ @5336 (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/virt/tests/stress_boot.py ('k') | client/virt/tests/whql_client_install.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/virt/tests/vlan.py
diff --git a/client/tests/kvm/tests/vlan.py b/client/virt/tests/vlan.py
similarity index 93%
rename from client/tests/kvm/tests/vlan.py
rename to client/virt/tests/vlan.py
index b1864c9a7e63772e16d36af48be9520749a9146b..9fc1f6401eeaf7823d2e2df74e6b049cfb9f9cdb 100644
--- a/client/tests/kvm/tests/vlan.py
+++ b/client/virt/tests/vlan.py
@@ -1,6 +1,6 @@
import logging, time, re
from autotest_lib.client.common_lib import error
-import kvm_test_utils, kvm_utils, kvm_subprocess
+from autotest_lib.client.virt import virt_utils, virt_test_utils, aexpect
def run_vlan(test, params, env):
@@ -53,7 +53,7 @@ def run_vlan(test, params, env):
return session.cmd_status(rem_vlan_cmd % (iface, iface))
def nc_transfer(src, dst):
- nc_port = kvm_utils.find_free_port(1025, 5334, vm_ip[dst])
+ nc_port = virt_utils.find_free_port(1025, 5334, vm_ip[dst])
listen_cmd = params.get("listen_cmd")
send_cmd = params.get("send_cmd")
@@ -66,7 +66,7 @@ def run_vlan(test, params, env):
session[src].cmd(send_cmd, timeout=60)
try:
session[dst].read_up_to_prompt(timeout=60)
- except kvm_subprocess.ExpectError:
+ except aexpect.ExpectError:
raise error.TestFail ("Fail to receive file"
" from vm%s to vm%s" % (src+1, dst+1))
#check MD5 message digest of receive file in dst
@@ -87,7 +87,7 @@ def run_vlan(test, params, env):
raise error.TestError("Could not log into guest(vm%d)" % i)
logging.info("Logged in")
- ifname.append(kvm_test_utils.get_linux_ifname(session[i],
+ ifname.append(virt_test_utils.get_linux_ifname(session[i],
vm[i].get_mac_address()))
#get guest ip
vm_ip.append(vm[i].get_address())
@@ -122,7 +122,7 @@ def run_vlan(test, params, env):
for i in range(2):
interface = ifname[i] + '.' + str(vlan)
dest = subnet +'.'+ str(vlan2)+ '.' + ip_unit[(i+1)%2]
- s, o = kvm_test_utils.ping(dest, count=2,
+ s, o = virt_test_utils.ping(dest, count=2,
interface=interface,
session=session[i], timeout=30)
if ((vlan == vlan2) ^ (s == 0)):
@@ -134,11 +134,11 @@ def run_vlan(test, params, env):
logging.info("Flood ping")
def flood_ping(src, dst):
- # we must use a dedicated session becuase the kvm_subprocess
+ # we must use a dedicated session becuase the aexpect
# does not have the other method to interrupt the process in
# the guest rather than close the session.
session_flood = vm[src].wait_for_login(timeout=60)
- kvm_test_utils.ping(vlan_ip[dst], flood=True,
+ virt_test_utils.ping(vlan_ip[dst], flood=True,
interface=ifname[src],
session=session_flood, timeout=10)
session_flood.close()
« no previous file with comments | « client/virt/tests/stress_boot.py ('k') | client/virt/tests/whql_client_install.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698