Fix up a whole ton of test documentation, as well as some minor style changes.
Also adds a few missing self.job.require_gcc() calls, etc.
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2240 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py
index 065a357..5fa0e43 100644
--- a/client/common_lib/utils.py
+++ b/client/common_lib/utils.py
@@ -93,6 +93,11 @@
return "%s/%s" % (long_to_ip(masked_ip), mask_bits)
+def normalize_hostname(alias):
+ ip = socket.gethostbyname(alias)
+ return socket.gethostbyaddr(ip)[0]
+
+
def get_ip_local_port_range():
match = re.match(r'\s*(\d+)\s*(\d+)\s*$',
read_one_line('/proc/sys/net/ipv4/ip_local_port_range'))
@@ -104,11 +109,6 @@
'%d %d\n' % (lower, upper))
-def normalize_hostname(alias):
- ip = socket.gethostbyname(alias)
- return socket.gethostbyaddr(ip)[0]
-
-
def read_one_line(filename):
return open(filename, 'r').readline().rstrip('\n')