From 32e4ad443383febb9da7d0299d751a547ae74aea Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 13 Mar 2019 20:40:31 +0200 Subject: [PATCH] tests: Decode station dump output to restore pre-python3 behavior These TDLS test cases missed Popen() result decode() calls in the earlier python3 compatibility changes. Add those to make debug log more readable. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_tdls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/hwsim/test_ap_tdls.py b/tests/hwsim/test_ap_tdls.py index bba2bacf3..315b2cc9b 100644 --- a/tests/hwsim/test_ap_tdls.py +++ b/tests/hwsim/test_ap_tdls.py @@ -427,7 +427,7 @@ def test_ap_open_tdls_vht80(dev, apdev): stdout=subprocess.PIPE) res = cmd.stdout.read() cmd.stdout.close() - logger.info("Station dump on dev[%d]:\n%s" % (i, res)) + logger.info("Station dump on dev[%d]:\n%s" % (i, res.decode())) except Exception as e: if isinstance(e, Exception) and str(e) == "AP startup failed": if not vht_supported(): @@ -471,7 +471,7 @@ def test_ap_open_tdls_vht80plus80(dev, apdev): stdout=subprocess.PIPE) res = cmd.stdout.read() cmd.stdout.close() - logger.info("Station dump on dev[%d]:\n%s" % (i, res)) + logger.info("Station dump on dev[%d]:\n%s" % (i, res.decode())) except Exception as e: if isinstance(e, Exception) and str(e) == "AP startup failed": if not vht_supported(): @@ -515,7 +515,7 @@ def test_ap_open_tdls_vht160(dev, apdev): stdout=subprocess.PIPE) res = cmd.stdout.read() cmd.stdout.close() - logger.info("Station dump on dev[%d]:\n%s" % (i, res)) + logger.info("Station dump on dev[%d]:\n%s" % (i, res.decode())) except Exception as e: if isinstance(e, Exception) and str(e) == "AP startup failed": if not vht_supported():