]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: better message from test_full_fsync
authorJohn Spray <john.spray@redhat.com>
Mon, 11 Jan 2016 12:27:51 +0000 (12:27 +0000)
committerJohn Spray <john.spray@redhat.com>
Mon, 11 Jan 2016 15:15:10 +0000 (15:15 +0000)
When it gives an error from the unexpected place,
say so.

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/test_full.py

index 2d2d6ec1594c355ec396c96f4769c8b4e80d4e7e..305c575a52b0a591a1ca83b00751b200b7901e6b 100644 (file)
@@ -314,7 +314,12 @@ class FullnessTestCase(CephFSTestCase):
             full = False
 
             for n in range(0, {fill_mb} + 1):
-                bytes += os.write(f, 'x' * 1024 * 1024)
+                try:
+                    bytes += os.write(f, 'x' * 1024 * 1024)
+                except OSError as e:
+                    print "Unexpected error %s from write() instead of fsync()" % e
+                    raise
+
                 try:
                     os.fsync(f)
                 except OSError as e: