summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2014-12-30 21:55:50 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2014-12-30 21:55:50 +0100
commit1ddc25d4c980b6bf03013149808dc453c6b59552 (patch)
tree3c89b303c38892182484f9d419d996f214194c3c
parentcf93824e79e02ff62f16eb0fab24d5574612e395 (diff)
integration-tests: Avoid udev lockup
Running umount of ntfs-3g mounts in a different cpu controller cgroup than udev causes uninterruptible lockups: https://launchpad.net/bugs/1398859 Avoid those by ensuring that we run in the root cgroup.
-rwxr-xr-xsrc/tests/integration-test8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/integration-test b/src/tests/integration-test
index 9ccd65a..88c2256 100755
--- a/src/tests/integration-test
+++ b/src/tests/integration-test
@@ -1352,6 +1352,14 @@ if __name__ == '__main__':
help='name of test class or method (e. g. "Drive", "FS.test_ext2")')
args = argparser.parse_args()
+ # don't run commands in a different cpu cgroup than udev, otherwise we get
+ # strange hangs (https://launchpad.net/bugs/1398859)
+ try:
+ with open('/sys/fs/cgroup/cpu,cpuacct/tasks', 'w') as f:
+ f.write(str(os.getpid()))
+ except IOError:
+ pass
+
UDisksTestCase.init(logfile=args.logfile)
if args.testname:
tests = unittest.TestLoader().loadTestsFromNames(