From c68c2d28c13ffd145cd91eaff2ae279551fa1548 Mon Sep 17 00:00:00 2001 From: Tomasz Kulasek Date: Mon, 10 Dec 2018 15:18:58 +0100 Subject: [PATCH] test/iscsi_tgt: fixup bytes to str for python 3.5 Change-Id: Ia73e950c746fb23f1188dc09a4a34c8ba5f97985 Signed-off-by: Tomasz Kulasek Reviewed-on: https://review.gerrithub.io/436680 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto --- test/iscsi_tgt/calsoft/calsoft.py | 2 +- test/iscsi_tgt/rpc_config/rpc_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/iscsi_tgt/calsoft/calsoft.py b/test/iscsi_tgt/calsoft/calsoft.py index 2970328e6..d50d4c1b5 100755 --- a/test/iscsi_tgt/calsoft/calsoft.py +++ b/test/iscsi_tgt/calsoft/calsoft.py @@ -37,7 +37,7 @@ known_failed_cases = ['tc_ffp_15_2', 'tc_ffp_29_2', 'tc_ffp_29_3', 'tc_ffp_29_4' def run_case(case, result_list, log_dir_path): try: - case_log = subprocess.check_output("{}/{}".format(CALSOFT_BIN_PATH, case), stderr=subprocess.STDOUT, shell=True) + case_log = subprocess.check_output("{}/{}".format(CALSOFT_BIN_PATH, case), stderr=subprocess.STDOUT, shell=True).decode('utf-8') except subprocess.CalledProcessError as e: result_list.append({"Name": case, "Result": "FAIL"}) case_log = e.output diff --git a/test/iscsi_tgt/rpc_config/rpc_config.py b/test/iscsi_tgt/rpc_config/rpc_config.py index 62c7bfb7a..bc7f7365e 100755 --- a/test/iscsi_tgt/rpc_config/rpc_config.py +++ b/test/iscsi_tgt/rpc_config/rpc_config.py @@ -65,7 +65,7 @@ class spdk_rpc(object): cmd = "{} {}".format(self.rpc_py, name) for arg in args: cmd += " {}".format(arg) - return check_output(cmd, shell=True) + return check_output(cmd, shell=True).decode("utf-8") return call