updated logging.warn to logging.warning due to deprecation in python3, fixed python 2/3 filter issue in tests, fixed utf decoding for some missed popen commands
This commit is contained in:
parent
69b1297002
commit
597bd21994
14 changed files with 70 additions and 66 deletions
|
@ -36,9 +36,9 @@ def createclients(sessiondir, clientcls=VnodeClient, cmdchnlfilterfunc=None):
|
|||
:rtype: list
|
||||
"""
|
||||
direntries = map(lambda x: os.path.join(sessiondir, x), os.listdir(sessiondir))
|
||||
cmdchnls = filter(lambda x: stat.S_ISSOCK(os.stat(x).st_mode), direntries)
|
||||
cmdchnls = list(filter(lambda x: stat.S_ISSOCK(os.stat(x).st_mode), direntries))
|
||||
if cmdchnlfilterfunc:
|
||||
cmdchnls = filter(cmdchnlfilterfunc, cmdchnls)
|
||||
cmdchnls = list(filter(cmdchnlfilterfunc, cmdchnls))
|
||||
cmdchnls.sort()
|
||||
return map(lambda x: clientcls(os.path.basename(x), x), cmdchnls)
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ def iperf(from_node, to_node, ip_prefixes):
|
|||
vcmd, stdin, stdout, stderr = to_node.client.popen(["iperf", "-s", "-u", "-y", "C"])
|
||||
from_node.cmd(["iperf", "-u", "-t", "5", "-c", address])
|
||||
to_node.cmd(["killall", "-9", "iperf"])
|
||||
return stdout.read().strip()
|
||||
return stdout.read().decode("utf-8").strip()
|
||||
|
||||
|
||||
class TestLinks:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue