summaryrefslogtreecommitdiffstats
path: root/debian/tests/boot-and-services
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/boot-and-services')
-rwxr-xr-xdebian/tests/boot-and-services12
1 files changed, 10 insertions, 2 deletions
diff --git a/debian/tests/boot-and-services b/debian/tests/boot-and-services
index e4ed862..45c02c9 100755
--- a/debian/tests/boot-and-services
+++ b/debian/tests/boot-and-services
@@ -129,6 +129,14 @@ class ServicesTest(unittest.TestCase):
@unittest.skipIf('pkg.systemd.upstream' in os.environ.get('DEB_BUILD_PROFILES', ''),
'Debian specific configuration, N/A for upstream')
def test_tmp_cleanup(self):
+ # autopkgtest overrides tmp.mount with empty /etc/systemd/system/tmp.mount
+ # as a workaround for issues where /tmp is filled up too easily. LP: #2069834
+ try:
+ if os.stat('/etc/systemd/system/tmp.mount').st_size == 0:
+ self.skipTest('autopkgtest environment has overridden tmp.mount')
+ except FileNotFoundError:
+ pass
+
# systemd-tmpfiles-clean.timer only runs 15 mins after boot, shortcut
# it
self.assertEqual(subprocess.call(
@@ -218,8 +226,8 @@ poweroff\n''')
out = nspawn.communicate(timeout=60)[0]
self.assertIn(b'Spawning container c1', out)
self.assertIn(b'fake container started', out)
- self.assertRegex(out, b'\n\s+1\s+0\s+init[\r\n]')
- self.assertRegex(out, b'\n\s+2+\s+0\s.*rcS[\r\n]')
+ self.assertRegex(out, rb'\n\s+1\s+0\s+init[\r\n]')
+ self.assertRegex(out, rb'\n\s+2+\s+0\s.*rcS[\r\n]')
self.assertRegex(out, b'Container c1.*shut down')
self.assertEqual(nspawn.returncode, 0)