diff --git a/btest b/btest index 51140292..811b524b 100755 --- a/btest +++ b/btest @@ -8,6 +8,7 @@ import configparser import copy import fnmatch import glob +import hashlib import io import multiprocess as mp import multiprocess.managers as mp_managers @@ -498,7 +499,7 @@ class TestManager(mp_managers.SyncManager): if not t: continue - if t.serialize and hash(t.serialize) % self._options.threads != thread_num: + if t.serialize and int(hashlib.md5(t.serialize.encode('utf-8')).hexdigest(), 16) % self._options.threads != thread_num: # Not ours. continue @@ -902,7 +903,7 @@ class Test(object): self.cmdseqs.append(seq) if "serialize" in cmds: - self.serialize = cmds["serialize"] + self.serialize = cmds["serialize"].strip() if "port" in cmds: self.ports |= set(cmd.strip() for cmd in cmds['port'])