In network.py function getInterfaceSpeed() only read the first line of ethtool's output, so it is impossible to get the correct speed. At least, 3 lines need to be modified: def getInterfaceSpeed(self): # default to 100 Mb/s self.interfaceSpeed = 0 for interfaceString in (self.interface, "p%s" % self.interface): ethtoolCommand = "ethtool %s" % interfaceString pipe = os.popen(ethtoolCommand) # line = pipe.readline() line=pipe.read() # use method read() to get the whole output pipe.close() if line: # pattern = re.compile("Speed: \d+Mb/s") pattern = re.compile("(Speed: )(?P<speed>\d+)(Mb/s)") # use re to match the speed match = pattern.search(line) if match: # self.interfaceSpeed = string.atoi(match.group()) self.interfaceSpeed = string.atoi(match.group("speed")) # transfer speed to type int break if self.interfaceSpeed == 0: # default it to 100 self.interfaceSpeed = 100 return False sys.stdout.flush() return True
Created attachment 324219 [details] network.py patch to for network speed This patch revises the network test to use the HTS Command wrapper to find network speed on a multi-line result from ethtool.
Verified network.py patch of Comment #1 was included in hts-5.3-12.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0047.html