]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: do not raise for kclient for _fsync test
authorXiubo Li <xiubli@redhat.com>
Thu, 27 May 2021 08:00:32 +0000 (16:00 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 27 Jul 2021 01:48:56 +0000 (09:48 +0800)
For kclient, the write() will return -ENOSPC instead of the fsync().

Fixes: https://tracker.ceph.com/issues/45434
Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/tasks/cephfs/test_full.py

index 86279b80c9acc23c21db9eaf073d76e7ee9b4c1c..6d98c28361f125d93e288b56eed37ab84b6df9fb 100644 (file)
@@ -325,8 +325,13 @@ class FullnessTestCase(CephFSTestCase):
                     bytes += os.write(f, b'x' * 1024 * 1024)
                     print("wrote bytes via buffered write, moving on to fsync")
                 except OSError as e:
-                    print("Unexpected error %s from write() instead of fsync()" % e)
-                    raise
+                    if {is_fuse}:
+                        print("Unexpected error %s from write() instead of fsync()" % e)
+                        raise
+                    else:
+                        print("Reached fullness after %.2f MB" % (bytes / (1024.0 * 1024.0)))
+                        full = True
+                        break
 
                 try:
                     os.fsync(f)