Author: gnichols Date: 2010-08-23 11:41:58 +0000 (Mon, 23 Aug 2010) New Revision: 652
Modified: trunk/tests/storage/storage.py Log: 626020 - storage test traceback on device size calculation
Modified: trunk/tests/storage/storage.py =================================================================== --- trunk/tests/storage/storage.py 2010-08-23 11:41:06 UTC (rev 651) +++ trunk/tests/storage/storage.py 2010-08-23 11:41:58 UTC (rev 652) @@ -141,12 +141,14 @@ size = self.maxSize (status,output) = commands.getstatusoutput("cat /sys/block/%s/size" % testdevice) # Why is the /sys size value 2x what /proc shows? - output = int(output) / 2 - if status == 0 and output < self.maxSize: + if status == 0: + output = int(output) / 2 + if output < self.maxSize: size = output + print "Testing device size %u" % size else: - print "Warning ! can not get device number. " - sys.stdout.flush() + print "Warning: can not get device size from /sys/block/%s/size, defaulting to %u. " % (testDevice, size) + sys.stdout.flush() return size
def deviceIsLvm(self,key,Device): @@ -384,7 +386,7 @@ if os.path.exists("/usr/sbin/dt"): print "Found dt package." else: - print "Error: No dt pachage found !" + print "Error: No dt package found !" return 1 # complains error if can not find any testable block device storageDevice = self.getLogicalDeviceName()
v7-commits@lists.stg.fedorahosted.org