From: Patrick Donnelly Date: Fri, 22 May 2020 21:15:19 +0000 (-0700) Subject: qa: return a string via getfattr X-Git-Tag: v15.2.4~42^2~68 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e80ec1276431021b8fc3c132698aef59f4162831;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 f7668046854..5976e380db9 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -715,7 +715,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 114a8763727..dd670177c3a 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): """