From 09d5e07d161c4f0d36b0e5624445e2e235826d2f Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Tue, 19 Apr 2022 14:54:31 +0530 Subject: [PATCH] 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 --- qa/tasks/cephfs/test_acls.py | 6 +++--- qa/tasks/cephfs/xfstests_dev.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qa/tasks/cephfs/test_acls.py b/qa/tasks/cephfs/test_acls.py index d042c5b1660..87c95e1329f 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 af352274138..de1f860d3d9 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): """ -- 2.39.5