Skip to content

Commit

Permalink
Python 3 migration of tests
Browse files Browse the repository at this point in the history
move more test case to python3

Signed-off-by: Praveen K Pandey <[email protected]>
  • Loading branch information
PraveenPenguin committed Sep 4, 2019
1 parent 6fa7d5d commit 39836f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fuzz/fsfuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def setUp(self):
self._args = self.params.get('fstype', default='')
self._fsfuzz = os.path.abspath(os.path.join('.', "fsfuzz"))
fs_sup = process.system_output('%s %s' % (self._fsfuzz, ' --help'))
match = re.search(r'%s' % self._args, fs_sup, re.M | re.I)
match = re.search(br'%s' % self._args, fs_sup, re.M | re.I)
if not match:
self.cancel('File system ' + self._args +
' is unsupported in ' + detected_distro.name)
Expand Down
2 changes: 1 addition & 1 deletion generic/criu.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test(self):
ignore_status=True, sudo=True)
logfile = os.path.join(self.logdir, "stdout")
failed_tests = process.system_output(
"grep -w FAIL %s" % logfile, shell=True, ignore_status=True)
"grep -w FAIL %s" % logfile, shell=True, ignore_status=True).decode("utf-8")
if failed_tests:
self.fail("test failed, Please check debug log for failed test cases")

Expand Down
2 changes: 1 addition & 1 deletion generic/rcutorture.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test(self):
self.cpus_toggle()
linux_modules.unload_module('rcutorture')

dmesg = process.system_output('dmesg')
dmesg = process.system_output('dmesg').decode("utf-8")

res = re.search(r'rcu-torture: Reader', dmesg, re.M | re.I)

Expand Down
2 changes: 1 addition & 1 deletion generic/sysbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def clear_dmesg(self):
process.run("dmesg -C ", sudo=True)

def verify_dmesg(self):
self.whiteboard = process.system_output("dmesg")
self.whiteboard = process.system_output("dmesg").decode("utf-8")
pattern = ['WARNING: CPU:', 'Oops',
'Segfault', 'soft lockup', 'Unable to handle']
for fail_pattern in pattern:
Expand Down

0 comments on commit 39836f6

Please sign in to comment.