From e80ec1276431021b8fc3c132698aef59f4162831 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 22 May 2020 14:15:19 -0700 Subject: [PATCH] qa: return a string via getfattr Fixes: https://tracker.ceph.com/issues/45666 Signed-off-by: Patrick Donnelly (cherry picked from commit 3c1330795add81126424e9e0a49cc07881fbdf8f) --- qa/tasks/cephfs/mount.py | 2 +- qa/tasks/cephfs/test_exports.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index f766804685409..5976e380db9d3 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 114a87637271e..dd670177c3a5c 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): """ -- 2.39.5