mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Make fuse tests fail on emergency ro or iter leak
Signed-off-by: Justin Husted <sigstop@gmail.com>
This commit is contained in:
parent
6b0e5ee29e
commit
1cddbe95f9
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import errno
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
import re
|
import re
|
||||||
@ -183,9 +184,17 @@ class BFuse:
|
|||||||
(out2, _) = self.proc.communicate()
|
(out2, _) = self.proc.communicate()
|
||||||
print("Process exited.")
|
print("Process exited.")
|
||||||
|
|
||||||
|
self.returncode = self.proc.returncode
|
||||||
|
if self.returncode == 0:
|
||||||
|
errors = [ 'btree iterators leaked!',
|
||||||
|
'emergency read only!' ]
|
||||||
|
for e in errors:
|
||||||
|
if e in out2:
|
||||||
|
print('Debug error found in output: "{}"'.format(e))
|
||||||
|
self.returncode = errno.ENOMSG
|
||||||
|
|
||||||
self.stdout = out1 + out2
|
self.stdout = out1 + out2
|
||||||
self.stderr = err.read()
|
self.stderr = err.read()
|
||||||
self.returncode = self.proc.returncode
|
|
||||||
self.vout = vlog.read().decode('utf-8')
|
self.vout = vlog.read().decode('utf-8')
|
||||||
|
|
||||||
def expect(self, pipe, regex):
|
def expect(self, pipe, regex):
|
||||||
|
Loading…
Reference in New Issue
Block a user