Author: gnichols
Date: 2011-03-25 11:53:07 +0000 (Fri, 25 Mar 2011)
New Revision: 834
Modified:
trunk/tests/network/network.py
Log:
637687 - Please show the NIC's info in detail
Modified: trunk/tests/network/network.py
===================================================================
--- trunk/tests/network/network.py 2011-03-25 11:49:00 UTC (rev 833)
+++ trunk/tests/network/network.py 2011-03-25 11:53:07 UTC (rev 834)
@@ -670,26 +670,37 @@
def printInfo(self):
# YK: grab NIC info and running status
sys.stdout.flush()
- print ""
- print "+----------%s info start----------+" % self.interface
- print "+-----Speed-----+"
- os.system("ethtool %s 2>/dev/null" % self.interface)
- print ""
try:
- ifconfig = Command("ifconfig %s" % self.interface)
- address = ifconfig.getString(regex="^.*HWaddr (?P<address>[a-fA-F0-9:]+)", regexGroup="address", singleLine=False)
- print "MAC Address: %s" % address
- except V7CommandException:
- print "Warning: could not determine MAC address"
- print "+-----Kudzu-----+"
- os.system("kudzu -p -c NETWORK 2>/dev/null")
- print ""
- print "+-----dmesg-----+"
- os.system("cat /var/log/dmesg | grep %s" % self.interface)
- print ""
- print "+----------%s info end----------+" % self.interface
- print ""
- sys.stdout.flush()
+ print ""
+ print "+----------%s info start----------+" % self.interface
+ print "+-----Speed-----+"
+ Command("ethtool %s" % self.interface).echoIgnoreErrors()
+ print ""
+ try:
+ ifconfig = Command("ifconfig %s" % self.interface)
+ address = ifconfig.getString(regex="^.*HWaddr (?P<address>[a-fA-F0-9:]+)", regexGroup="address", singleLine=False)
+ print "MAC Address: %s" % address
+ except V7CommandException:
+ print "Warning: could not determine MAC address"
+
+ try:
+ kudzu = Command("kudzu -p -c NETWORK ")
+ kudzu.run()
+ print "+-----Kudzu-----+"
+ kudzu.printOutput()
+ print ""
+ except V7CommandException, exception:
+ # ignore kudzu if it errors
+ pass
+ print "+-----dmesg-----+"
+ Command("cat /var/log/dmesg | grep %s" % self.interface).echoIgnoreErrors()
+ print ""
+ print "+----------%s info end----------+" % self.interface
+ print ""
+ sys.stdout.flush()
+ except V7CommandException, exception:
+ print "Warning: %s" % exception
+ exception.command.printErrors()
return True
@@ -730,7 +741,7 @@
if not self.runSubTest(self.printInfo, "Info"):
return FAILED
-
+
# start testing
success = True
if not self.runSubTest(self.tcpTest, "TCP", "tcp latency and bandwidth test via lmbench"):