Index: lnt/trunk/lnt/testing/profile/perf.py =================================================================== --- lnt/trunk/lnt/testing/profile/perf.py +++ lnt/trunk/lnt/testing/profile/perf.py @@ -18,7 +18,7 @@ @staticmethod def checkFile(fn): - return open(fn).read(8) == 'PERFILE2' + return open(fn, 'rb').read(8) == b'PERFILE2' @staticmethod def deserialize(f, nm='nm', objdump='objdump', propagateExceptions=False): Index: lnt/trunk/lnt/testing/profile/profilev1impl.py =================================================================== --- lnt/trunk/lnt/testing/profile/profilev1impl.py +++ lnt/trunk/lnt/testing/profile/profilev1impl.py @@ -43,7 +43,7 @@ @staticmethod def checkFile(fn): # "zlib compressed data" - 78 9C - return open(fn).read(2) == '\x78\x9c' + return open(fn, 'rb').read(2) == b'\x78\x9c' @staticmethod def deserialize(fobj): Index: lnt/trunk/lnt/testing/profile/profilev2impl.py =================================================================== --- lnt/trunk/lnt/testing/profile/profilev2impl.py +++ lnt/trunk/lnt/testing/profile/profilev2impl.py @@ -558,7 +558,7 @@ def checkFile(fn): # The first number is the version (2); ULEB encoded this is simply # 0x02. - return ord(open(fn).read(1)) == 2 + return open(fn, 'rb').read(1) == b'\x02' @staticmethod def deserialize(fobj):