summaryrefslogtreecommitdiff
path: root/tests/util.py
diff options
context:
space:
mode:
authorJustin Husted <sigstop@gmail.com>2021-06-05 01:49:41 -0700
committerJustin Husted <sigstop@gmail.com>2021-06-05 01:49:41 -0700
commit1cddbe95f9df8565baa69b72b1b8df4d722bb818 (patch)
treefc99d76cf51aa5594bf54cd105fb190edcdcfcb4 /tests/util.py
parent6b0e5ee29ee47013659c687d4fb7ce74469a7723 (diff)
Make fuse tests fail on emergency ro or iter leak
Signed-off-by: Justin Husted <sigstop@gmail.com>
Diffstat (limited to 'tests/util.py')
-rw-r--r--tests/util.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/util.py b/tests/util.py
index 41b13c05..b5e02c13 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -1,5 +1,6 @@
#!/usr/bin/python3
+import errno
import os
import pytest
import re
@@ -183,9 +184,17 @@ class BFuse:
(out2, _) = self.proc.communicate()
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.stderr = err.read()
- self.returncode = self.proc.returncode
self.vout = vlog.read().decode('utf-8')
def expect(self, pipe, regex):