From 89a18171342e2137574fc2f33bcea998b3d50295 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 2 Nov 2020 19:59:30 -0800 Subject: [PATCH] qa: do not test dir size equals rbytes 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 --- qa/tasks/cephfs/test_volumes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 152cef91177..8f0dcb52b2c 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -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