summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-05-31 15:26:05 +0200
committerGitHub <noreply@github.com>2023-05-31 15:26:05 +0200
commitedabe6fc11bcfa82c3f452f055e86d31d8a38fba (patch)
tree316b4fc9e94772df52f614311bd130ada248ba7f /test
parentMerge pull request #27766 from rphibel/cleanup-cgroups-before-cleaning-units (diff)
parentmkosi: Check for failures by mounting again (diff)
downloadsystemd-edabe6fc11bcfa82c3f452f055e86d31d8a38fba.tar.xz
systemd-edabe6fc11bcfa82c3f452f055e86d31d8a38fba.zip
Merge pull request #27806 from DaanDeMeyer/fix-mkosi-check
mkosi: Use proper check to detect whether we're in a VM
Diffstat (limited to 'test')
-rwxr-xr-xtest/sysv-generator-test.py4
-rwxr-xr-xtest/test-udev.py6
2 files changed, 9 insertions, 1 deletions
diff --git a/test/sysv-generator-test.py b/test/sysv-generator-test.py
index 484b610a02..1fe4153abc 100755
--- a/test/sysv-generator-test.py
+++ b/test/sysv-generator-test.py
@@ -52,7 +52,9 @@ class SysvGeneratorTest(unittest.TestCase):
parsed generated units.
'''
env = os.environ.copy()
- env['SYSTEMD_LOG_LEVEL'] = 'debug'
+ # We might debug log about errors that aren't actually fatal so let's bump the log level to info to
+ # prevent those logs from interfering with the test.
+ env['SYSTEMD_LOG_LEVEL'] = 'info'
env['SYSTEMD_LOG_TARGET'] = 'console'
env['SYSTEMD_SYSVINIT_PATH'] = self.init_d_dir
env['SYSTEMD_SYSVRCND_PATH'] = self.rcnd_dir
diff --git a/test/test-udev.py b/test/test-udev.py
index 7e9afc4fc8..710aaed3a9 100755
--- a/test/test-udev.py
+++ b/test/test-udev.py
@@ -2346,6 +2346,12 @@ def environment_issue():
check=False)
if c.returncode == 0:
return 'Running in a chroot, skipping the test'
+
+ c = subprocess.run(['systemd-detect-virt', '-c', '-q'],
+ check=False)
+ if c.returncode == 0:
+ return 'Running in a container, skipping the test'
+
return None