]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: do not test dir size equals rbytes
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 3 Nov 2020 03:59:30 +0000 (19:59 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 3 Nov 2020 21:01:31 +0000 (13:01 -0800)
Avoiding this failure:

2020-11-03T03:11:59.980 INFO:tasks.cephfs_test_runner:test_subvolume_resize_fail_quota_lt_used_size_no_shrink (tasks.cephfs.test_volumes.TestSubvolumes) ... FAIL
2020-11-03T03:11:59.981 INFO:tasks.cephfs_test_runner:
2020-11-03T03:11:59.981 INFO:tasks.cephfs_test_runner:======================================================================
2020-11-03T03:11:59.981 INFO:tasks.cephfs_test_runner:FAIL: test_subvolume_resize_fail_quota_lt_used_size_no_shrink (tasks.cephfs.test_volumes.TestSubvolumes)
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-pdonnell-testing-20201102.231317/qa/tasks/cephfs/test_volumes.py", line 1310, in test_subvolume_resize_fail_quota_lt_used_size_no_shrink
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner:    self.assertEqual(usedsize, susedsize)
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner:AssertionError: 8912896 != 1

From: /ceph/teuthology-archive/pdonnell-2020-11-03_02:22:55-fs:volumes-wip-pdonnell-testing-20201102.231317-distro-basic-smithi/5585383/teuthology.log

Fixes: https://tracker.ceph.com/issues/23718
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/test_volumes.py

index 152cef91177d8b8c8bd351e1c22cb690b8f1f7e4..8f0dcb52b2c750283a0abce97e4079bc18f7e863 100644 (file)
@@ -1262,7 +1262,9 @@ class TestSubvolumes(TestVolumesHelper):
 
         usedsize = int(self.mount_a.getfattr(subvolpath, "ceph.dir.rbytes"))
         susedsize = int(self.mount_a.run_shell(['stat', '-c' '%s', subvolpath]).stdout.getvalue().strip())
-        self.assertEqual(usedsize, susedsize)
+        if isinstance(self.mount_a, FuseMount):
+            # kclient dir does not have size==rbytes
+            self.assertEqual(usedsize, susedsize)
 
         # shrink the subvolume
         nsize = usedsize // 2
@@ -1307,7 +1309,9 @@ class TestSubvolumes(TestVolumesHelper):
 
         usedsize = int(self.mount_a.getfattr(subvolpath, "ceph.dir.rbytes"))
         susedsize = int(self.mount_a.run_shell(['stat', '-c' '%s', subvolpath]).stdout.getvalue().strip())
-        self.assertEqual(usedsize, susedsize)
+        if isinstance(self.mount_a, FuseMount):
+            # kclient dir does not have size==rbytes
+            self.assertEqual(usedsize, susedsize)
 
         # shrink the subvolume
         nsize = usedsize // 2