summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2007-08-28 18:17:34 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2007-08-28 18:17:34 +0000
commit89dfdc5918d6b31a25bd4cb401e44543e94b26cf (patch)
tree3828386071ee56db2f9915ba8d5e8657637be8d6 /client
parent859d665697459f80b4671e0d3192ef5a5c975485 (diff)
Fix exception handling in filesystems class
Signed-off-by: Martin J. Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@635 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'client')
-rwxr-xr-xclient/bin/filesystem.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/client/bin/filesystem.py b/client/bin/filesystem.py
index 6b8513a2..a4c697b4 100755
--- a/client/bin/filesystem.py
+++ b/client/bin/filesystem.py
@@ -78,18 +78,17 @@ class filesystem:
system("yes | " + mkfs_cmd)
except:
self.job.record("FAIL " + mkfs_cmd)
+ raise
else:
self.job.record("GOOD " + mkfs_cmd)
self.fstype = fstype
-
def fsck(self, args = ''):
fsck = 'fsck %s %s' % (self.device, args)
print fsck
sys.stdout.flush()
- ret = system(fsck, ignorestatus=1)
- return not ret
+ system(fsck)
def mount(self, mountpoint = None, args = ''):
@@ -125,7 +124,13 @@ class filesystem:
umount_cmd = "umount " + handle
print umount_cmd
sys.stdout.flush()
- system(umount_cmd)
+ try:
+ system(umount_cmd)
+ except:
+ self.job.record("FAIL " + umount_cmd)
+ raise
+ else:
+ self.job.record("GOOD " + umount_cmd)
def get_io_scheduler_list(self, device_name):