From: Rishabh Dave Date: Tue, 19 Apr 2022 09:24:31 +0000 (+0530) Subject: qa/cephfs: use StringIO instead of BytesIO X-Git-Tag: v18.0.0~908^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=09d5e07d161c4f0d36b0e5624445e2e235826d2f;p=ceph.git qa/cephfs: use StringIO instead of BytesIO StringIO can be operated on without extra hassles of converting. So replace BytesIO by StringIO in test_acls.py and xfstests_dev.py Signed-off-by: Rishabh Dave --- diff --git a/qa/tasks/cephfs/test_acls.py b/qa/tasks/cephfs/test_acls.py index d042c5b16607..87c95e1329fe 100644 --- a/qa/tasks/cephfs/test_acls.py +++ b/qa/tasks/cephfs/test_acls.py @@ -1,6 +1,6 @@ from logging import getLogger -from io import BytesIO +from io import StringIO from tasks.cephfs.xfstests_dev import XFSTestsDev log = getLogger(__name__) @@ -22,6 +22,6 @@ class TestACLs(XFSTestsDev): log.info('client is kernel mounted') self.mount_a.client_remote.run(args=['sudo', './check', - 'generic/099'], cwd=self.repo_path, stdout=BytesIO(), - stderr=BytesIO(), timeout=30, check_status=True, omit_sudo=False, + 'generic/099'], cwd=self.repo_path, stdout=StringIO(), + stderr=StringIO(), timeout=30, check_status=True, omit_sudo=False, label='running tests for ACLs from xfstests-dev') diff --git a/qa/tasks/cephfs/xfstests_dev.py b/qa/tasks/cephfs/xfstests_dev.py index af3522741389..de1f860d3d9d 100644 --- a/qa/tasks/cephfs/xfstests_dev.py +++ b/qa/tasks/cephfs/xfstests_dev.py @@ -1,4 +1,4 @@ -from io import BytesIO +from io import StringIO from logging import getLogger from tasks.cephfs.cephfs_test_case import CephFSTestCase @@ -29,11 +29,11 @@ class XFSTestsDev(CephFSTestCase): # NOTE: On teuthology machines it's necessary to run "make" as # superuser since the repo is cloned somewhere in /tmp. self.mount_a.client_remote.run(args=['sudo', 'make'], - cwd=self.repo_path, stdout=BytesIO(), - stderr=BytesIO()) + cwd=self.repo_path, stdout=StringIO(), + stderr=StringIO()) self.mount_a.client_remote.run(args=['sudo', 'make', 'install'], cwd=self.repo_path, omit_sudo=False, - stdout=BytesIO(), stderr=BytesIO()) + stdout=StringIO(), stderr=StringIO()) def get_repo(self): """