When we started using autotest to run test against a VM based chromium os,
we found autotest was not able to handle ssh port other than 22, autoserv
--ssh-port did not work as it suppose to.

It turned our the ssh options were not properly passed into SSHHost class.

Index: server/hosts/ssh_host.py
diff --git a/server/hosts/ssh_host.py b/server/hosts/ssh_host.py
index 
2f5a08093e75c31f72984c1f83999d9a2d816288..fdf6a8c9014b49c58f41cc7b3eb18bdd01042d2a
100644
--- a/server/hosts/ssh_host.py
+++ b/server/hosts/ssh_host.py
@@ -38,14 +38,17 @@ class SSHHost(abstract_ssh.AbstractSSHHost):
     implement the unimplemented methods in parent classes.
     """

-    def _initialize(self, hostname, *args, **dargs):
+    def _initialize(self, hostname, user="root", port=22, password="",
+                    *args, **dargs):
         """
         Construct a SSHHost object

         Args:
                 hostname: network hostname or address of remote machine
         """
-        super(SSHHost, self)._initialize(hostname=hostname, *args, **dargs)
+        super(SSHHost, self)._initialize(hostname=hostname, user=user,
+                                         port=port, password=password,
+                                         *args, **dargs)
         self.setup_ssh()



-- 
Eric Li
李咏竹
Google Kirkland
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to