Author: gnichols Date: 2010-08-20 17:46:49 +0000 (Fri, 20 Aug 2010) New Revision: 646
Modified: trunk/tests/storage/storage.py Log: 621070 - storage test failes using lvm swap partition on RHEL6
Modified: trunk/tests/storage/storage.py =================================================================== --- trunk/tests/storage/storage.py 2010-08-20 17:43:43 UTC (rev 645) +++ trunk/tests/storage/storage.py 2010-08-20 17:46:49 UTC (rev 646) @@ -205,14 +205,25 @@ mkswapOption = " " print "swap device has no label." # restore the swap device + print "restoring swap device /dev/%s ..." % swapdev try: - print "restoring swap device /dev/%s ..." % swapdev + Command("umount /dev/%s" % swapdev).echo() + except: + #ignore errors + pass + try: Command("mkswap %s /dev/%s" % (mkswapOption, swapdev)).run() + except V7CommandException, exception: + print "Warning: mkswap may have failed." + print exception + exception.command.printErrors() + try: Command("swapon %s" % swaponDevice).run() print "done." except V7CommandException, exception: print "Error: could not restore swap" print exception + exception.command.printErrors() return False return True
v7-commits@lists.stg.fedorahosted.org