From: Patrick Donnelly Date: Fri, 22 May 2020 21:15:19 +0000 (-0700) Subject: qa: return a string via getfattr X-Git-Tag: v14.2.10~6^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d3f2c8cc7d41c8fe7293fe35e430162d01186eff;p=ceph.git qa: return a string via getfattr Fixes: https://tracker.ceph.com/issues/45666 Signed-off-by: Patrick Donnelly (cherry picked from commit 3c1330795add81126424e9e0a49cc07881fbdf8f) --- diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index e56010b4aa521..ee36bc818e655 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -669,7 +669,7 @@ class CephFSMount(object): else: raise - return p.stdout.getvalue() + return str(p.stdout.getvalue()) def df(self): """ diff --git a/qa/tasks/cephfs/test_exports.py b/qa/tasks/cephfs/test_exports.py index 019c91c5a8c0b..abaf92e6bdae1 100644 --- a/qa/tasks/cephfs/test_exports.py +++ b/qa/tasks/cephfs/test_exports.py @@ -133,10 +133,10 @@ class TestExports(CephFSTestCase): log.debug("mount.getfattr('1','ceph.dir.pin'): %s " % dir_pin) if str(p) < "5" and not(dir_pin): self.skipTest("Kernel does not support getting the extended attribute ceph.dir.pin") - self.assertEqual(self.mount_a.getfattr("1", "ceph.dir.pin"), b'1') - self.assertEqual(self.mount_a.getfattr("1/2", "ceph.dir.pin"), b'0') + self.assertEqual(self.mount_a.getfattr("1", "ceph.dir.pin"), '1') + self.assertEqual(self.mount_a.getfattr("1/2", "ceph.dir.pin"), '0') if (len(self.fs.get_active_names()) > 2): - self.assertEqual(self.mount_a.getfattr("1/2/3", "ceph.dir.pin"), b'2') + self.assertEqual(self.mount_a.getfattr("1/2/3", "ceph.dir.pin"), '2') def test_session_race(self): """