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 <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-03-13 20:40:31 +02:00 committed by Jouni Malinen
parent 3d5cfa0f6d
commit 32e4ad4433

View file

@ -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():