diff --git a/benchexec/cgroups.py b/benchexec/cgroups.py
index <HASH>..<HASH> 100644
--- a/benchexec/cgroups.py
+++ b/benchexec/cgroups.py
@@ -164,7 +164,7 @@ def remove_cgroup(cgroup):
 
 class Cgroup(object):
     def __init__(self, cgroupsPerSubsystem):
-        assert cgroupsPerSubsystem.keys() <= ALL_KNOWN_SUBSYSTEMS
+        assert set(cgroupsPerSubsystem.keys()) <= ALL_KNOWN_SUBSYSTEMS
         assert all(cgroupsPerSubsystem.values())
         self.per_subsystem = cgroupsPerSubsystem # update self.paths on every update to this
         self.paths = set(cgroupsPerSubsystem.values()) # without duplicates
diff --git a/benchexec/test_runexecutor.py b/benchexec/test_runexecutor.py
index <HASH>..<HASH> 100644
--- a/benchexec/test_runexecutor.py
+++ b/benchexec/test_runexecutor.py
@@ -40,6 +40,8 @@ class TestRunExecutor(unittest.TestCase):
         cls.longMessage = True
         cls.maxDiff = None
         logging.disable(logging.CRITICAL)
+        if not hasattr(cls, 'assertRegex'):
+            cls.assertRegex = cls.assertRegexpMatches
 
     def setUp(self):
         self.runexecutor = RunExecutor()
Some compatibility fixes for making runexecutor work on Python 2