]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: return a string via getfattr
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 22 May 2020 21:15:19 +0000 (14:15 -0700)
committerKefu Chai <kchai@redhat.com>
Sun, 14 Jun 2020 08:34:52 +0000 (16:34 +0800)
Fixes: https://tracker.ceph.com/issues/45666
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 3c1330795add81126424e9e0a49cc07881fbdf8f)

qa/tasks/cephfs/mount.py
qa/tasks/cephfs/test_exports.py

index f766804685409f6baaaebbe4f5cb3fffc17664c9..5976e380db9d3a186e33fdac78ef2dbd122c342a 100644 (file)
@@ -715,7 +715,7 @@ class CephFSMount(object):
             else:
                 raise
 
-        return p.stdout.getvalue()
+        return str(p.stdout.getvalue())
 
     def df(self):
         """
index 114a87637271ea3d059b62c929be531e7301e554..dd670177c3a5c743b565bd0fe9fa921400987717 100644 (file)
@@ -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):
         """