Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 689918 Details for
Bug 904134
[RHEL7] storage test can not restore swap
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
storage patch unmounting tested device in all cases
storage.patch (text/plain), 3.28 KB, created by
Greg Nichols
on 2013-01-29 16:01:23 UTC
(
hide
)
Description:
storage patch unmounting tested device in all cases
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2013-01-29 16:01:23 UTC
Size:
3.28 KB
patch
obsolete
>diff --git a/tests/storage/storage.py b/tests/storage/storage.py >index 49f850c..f83c417 100644 >--- a/tests/storage/storage.py >+++ b/tests/storage/storage.py >@@ -147,6 +147,11 @@ class StorageTest(Test): > > def dtTest(self, minBs, maxBs, file, size, otherOptions): > """Do a few passes of read/write testing on the given device.""" >+ # if debugging and interactive, prompt before diving into the testing >+ if self.debug != Constants.off and self.mode != Constants.auto: >+ if not self.promptContinue("Starting dt testing"): >+ print "Error: dt test skipped via prompt." >+ return False > seq_opt = "of=%s iotype=sequential dispose=keep %s" % (file, otherOptions) > # random passes > # generate a random seed first >@@ -208,15 +213,14 @@ class StorageTest(Test): > mountFile = mountFileTmp.read() > mountFileTmp.close() > deviceFile = "/dev/" + testdev >- if deviceFile in mountFile: >- if os.system("umount %s" % deviceFile) is 0: >- return True >- else: >- return False >- else: >- if self.debug != Constants.off: >- print "skipping umount: device %s not in /proc/mounts" % deviceFile >+ if not deviceFile in mountFile and self.debug != Constants.off: >+ print "Warning: device %s not in /proc/mounts" % deviceFile >+ umount = "umount %s" % deviceFile >+ print umount >+ if os.system(umount) is 0: > return True >+ else: >+ return False > > def getSwapLabel(self,swapdev): > """try to get the swap label""" >@@ -510,33 +514,30 @@ class StorageTest(Test): > if size_tmp: > minBs = size_tmp > # start to torture the disks >- returnValue = self.testVFS(self.storageDevice,testdev,minBs,maxBs) >- if returnValue: >- print "\n*** VFS (buffered filesystem) testing passed.\n" >- returnValue = self.testRawIO(self.storageDevice,testdev,minBs,maxBs) >- if returnValue: >- print "\n*** Raw I/O testing passed.\n" >- returnValue=0 >- else: >- return False >+ success = self.testVFS(self.storageDevice,testdev,minBs,maxBs) >+ if success: >+ print "VFS (buffered filesystem) testing passed.\n" >+ if not self.testRawIO(self.storageDevice,testdev,minBs,maxBs): >+ success = False > else: >- return False >+ print "Raw I/O testing passed.\n" >+ > # Clean up, try to restore swap if needed. > if testdev == swapdev: > if self.restoreSwap(swapdev,swapLabel): > print "restored the swap device." > else: > print "Error: restore swap error !" >- return False >+ success = False > # try to remove temp directories > os.system("rmdir %s.* 2>/dev/null" % self.storageDevice) >- if returnValue == 0: >+ >+ if success: > result = "passed" > else: >- returnValue = 1 > result = "failed" > print "\nStorage test on device %s %s" % (self.storageDevice, result) >- return (returnValue == 0) >+ return success > > def run(self): > FAILED = 1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 904134
: 689918